Localization doesn't work in watchOS widget configuration intent

Hi,

I have a problem with watchOS widget configuration intents. It turns out that watchOS is unable to load text for localization keys.

This is how I set configuration parameter in WidgetConfigurationIntent:

@Parameter(
    title: LocalizedStringResource(
        "watchWidgetConfig.showSymbols",
        defaultValue: "Symbole",
        table: "WidgetLocalizable",
        bundle: widgetBundle
    ),
    default: true
)
var showSymbols: Bool

Unfortunately, on a device always the defaultValue is used.

I tried everything and nothing works. What's weird, it correctly works on watchOS simulator and if you configure widgets in iOS "Watch" app. On real Apple Watch, the "defaultValue" is displayed.

I'm not sure if it's important but both: the Swift file with WidgetConfigurationIntent and WidgetLocalizable.xcstring are included in two targets: Watch Widget Extension and Watch App.

I tried so far:

  • All variants of LocalizableStringResource init. With/without "table", with/without "bundle".
  • Previously I had texts in Localizable.strings, I migrated it to WidgetLocalizable.xcstrings and it didn't work either.
  • Setting only one target for WidgetLocalizable.xcstring and WidgetConfigurationIntent.
  • I checked inside xcarchive to see if WidgetLocalizable.xcstring is copied correctly.

Seems like watchOS bug, but I would be happy to know if someone figured out any workaround.

Xcode: Version 26.4 (17E192)
iOS 26.4.1
watchOS 26.4

I already created a ticket: FB22509406

My test project doesn't seem to present the issue on my Apple Watch + watchOS 26.4...

Do you have a minimal project, with detailed steps, to reproduce the issue? If you can provide, I'd be interested in taking a look.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

My real project is based on xcodegen, so I was able to recreate a very similar structure and dependencies to reproduce my case. However, I don't have Apple Watch, so I can't tell if it is reproducible in this sample project. On simulator it always work well.

Well, in this case, where you aren't sure the issue can be reproduced with your project, I'd suggest that you contact DTS directly by submitting your question here (Apple developer account log-in required), and then share your DTS request ID here for me to pick up. From there, I can probably provide my test project so you can check if you do something differently.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

@DTS Engineer so what's going on with this issue? I created DTS ticket as requested, I provided reproducible minimal project, and the only thing I received is this message...

Thank you for providing this information. It is quite intriguing and I believe it would be prudent to file a bug report to investigate the underlying cause of this issue. As we do not encounter any localization-related problems on watchOS, it is possible that you have identified an issue that requires our attention.

Please submit a complete bug report regarding this issue using Feedback Assistant

So the localization isn't working and this bug is going to be ignored for the next couple of years? Great support in exchange for a yearly developer subscription and a 15% fee on app sales.

Not to mention another truly critical bug that hasn't been fixed for 2 years... https://developer.apple.com/forums/thread/757380

Hopefully this is not too late. I've been quite swamped these days...

First, when opening your project with my Xcode (26.4) and selecting the WidgetLocalizable.xcstrings file, and I saw that Xcode showed a warning sign for the watchWidgetConfig.some.title key. Clicking the sign gave me the following:

References to this key could not be found in source code. ...

I wasn't sure how you had gotten there, but I did the following to fix the issue:

  1. Removed the key.
  2. Turned on the "Use Compiler to Extract Swift Strings" build setting the targets.
  3. Re-built the project. Observe that Xcode generated the watchWidgetConfig.some.title key, and the warning sign disappeared.

Your project then looked good, and so I managed to build and run your project on my Apple Watch, and was able to reproduce and debug the issue, and here is my finding:

In your project, AppIntent.swift and WidgetLocalizable.xcstrings are shared by the Watch and WatchWidgets targets. With some debugging, I find that removing the Watch target from the Target Membership (so that only the WatchWidgets target uses the two files) seems to fix the issue.

I have sent you the tweaked project, which works for me, via the DTS channel. If you don't mind, please give it a try and share if you see the same thing.

Sharing localization resources among multiple targets is nothing wrong, but if that is not really needed in your case, you might be able to work around the issue.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Hopefully this is not too late. I've been quite swamped these days...

No, I'm still trying to resolve this problem. Thank you for investigating it.

Tomorrow, I will be able to check it on a physical device. However, even if this is a workaround, it won't help in my case, because I need to have access to intents from the watch app to check a couple of things and to perform old complications migration from ClockKit to WidgetKit.

Also, intents should be shared between the watchOS app and widgets extension. If you don't share it and tap on a widget you get these warnings in the console:

Failed to instantiate type ConfigurationAppIntent by name (12WatchWidgets22ConfigurationAppIntentV). The type with this mangled name does not exist in the process’s memory space.

[InitializeAction <<E:A1CC23EC19DC>>] Could not find an intent with identifier ConfigurationAppIntent, mangledTypeName: Optional("12WatchWidgets22ConfigurationAppIntentV")

associateAppIntent(forUserActivity:) - Error converting INIntent to App Intent: AppIntents.PerformIntentError.intentNotFound

You can check this if you run your project from Xcode (watchOS app target) and tap on a widget.

I managed to perform multiple tests on the physical Apple Watch and I can confirm that the root cause of this problem is the app intent shared between watchOS and widget extension target. Having this file in a single target solves the issue.

However, this approach can’t be used to workaround this issue because the widget configuration intent is by design supposed to be used in these two targets. Otherwise, tapping on a widget produces silent errors, which I included in the previous post. Also, sharing intents is necessary to be able to perform ClockKit complications migration and to check widgets configuration from the watchOS app.

So we found the root cause, but we don’t have any suitable workaround yet. This problem is clearly watchOS bug.

Additionally, I also observed that sharing the intent between iOS app and widget extension doesn’t cause this issue. So it happens only when the intent is shared between watchOS app and widget extension.

Also, the problem isn’t caused by sharing the localization file. It all depends on target membership of the intent file.

Localization doesn't work in watchOS widget configuration intent
 
 
Q