Hi there,
I’m having trouble with localization for App Intents used in a configurable widget when the intents are defined inside a Swift Package.
The intents appear correctly in the widget configuration UI and function as expected, but the localized strings are not displayed.
Instead, the widget shows the localization keys themselves.
Setup
- Xcode: 26.1
- iOS: 26
- The App Intents are used for a configurable widget
- Intent is located in a Swift Package
- The Widget Extension depends on the package
AppIntentsPackagesetup:// In the package public struct MySharedIntentsPackage: AppIntentsPackage {} // In the widget extension import AppIntents import SharedAppIntents struct WidgetIntentsPackage: AppIntentsPackage { static var includedPackages: [any AppIntentsPackage.Type] { [MySharedIntentsPackage.self] } }
What I’ve tried
I tested several configurations separately to see which setup allows localization to work:
-
Localizing inside the Swift Package
- Placed a
Localizable.xcstringsfile inside the Swift Package. - Specified
.modulefor thebundleparameter inLocalizedStringResourceinitializers.
→ The widget still displayed the localization keys.
- Placed a
-
Localizing inside the Widget Extension
- Placed a
Localizable.xcstringsfile inside the Widget Extension target instead of the package.
→ The widget continued to show the localization keys.
- Placed a
-
Allowing mixed localizations
- Added
CFBundleAllowMixedLocalizations = YESto the Widget Extension’s Info.plist.
→ No change; the widget still showed the keys.
- Added
Problem
In the WWDC 2025 session “Get to Know App Intents”, it was announced that App Intents would officially support Swift Packages.
However, despite following that guidance, here we have a situation where the localizations do not work and only the keys appear in a configurable widget’s configuration UI.
When I move the same App Intent code directly into the Widget Extension target, localization works as expected, but not when the intent remains inside the Swift Package.
Question
Is localization for App Intents defined in Swift Packages officially supported for configurable widgets?
If yes:
- Which bundle does App Intents use to resolve localized strings?
- Should the
.xcstringsfile be placed in the package or in the host extension’s bundle? - Or is this a current limitation or known issue?
Any clarification or workaround would be greatly appreciated.
Thank you.