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
LocalizableStringResourceinit. With/without "table", with/without "bundle". - Previously I had texts in
Localizable.strings, I migrated it toWidgetLocalizable.xcstringsand it didn't work either. - Setting only one target for
WidgetLocalizable.xcstringandWidgetConfigurationIntent. - I checked inside
xcarchiveto see ifWidgetLocalizable.xcstringis 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