Skip to content

Add iOS localization support to sample app (en + es)#731

Open
crow wants to merge 2 commits intomainfrom
MOBILE-ios-localization-sample
Open

Add iOS localization support to sample app (en + es)#731
crow wants to merge 2 commits intomainfrom
MOBILE-ios-localization-sample

Conversation

@crow
Copy link
Copy Markdown
Contributor

@crow crow commented Apr 7, 2026

Summary

  • Adds es as a declared localization in AirshipExample.xcodeproj alongside the existing en
  • Adds Localizable.strings for both locales to the main app target and ExampleWidgetsExtension
  • Updates ExampleWidgetsLiveActivity to use String(localized:) with a comment explaining the iOS fallback behavior

The sample app just didn't have es declared as a supported localization in Xcode. iOS only uses the device language if it matches one of the locales declared under Project > Info > Localizations - if it doesn't match, it falls back to the development region. Adding this to the sample so we have something concrete to point customers at when this comes up.

Testing

Build and run on a simulator set to es and confirm the channel language attribute resolves to es. Trigger a Live Activity and verify the Spanish strings show on the lock screen and Dynamic Island. Flip back to en and confirm English strings still work.

Demonstrates how to correctly configure supported localizations in Xcode
so iOS reports the right device language to Airship. Without this, iOS
falls back to the development region (en) for all users, causing the
language channel attribute and Live Activity locale selection to always
appear as English regardless of device language.

- Add `es` to project knownRegions in AirshipExample.xcodeproj
- Add en/es Localizable.strings to AirshipExample and ExampleWidgets targets
- Update ExampleWidgetsLiveActivity to use String(localized:) with a comment
  explaining the iOS localization fallback behavior
@crow crow requested a review from a team as a code owner April 7, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant