You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking into adding Shortcuts integration to my app on iOS. The Apple documentation shows an example for AppIntent here:
structOpenFavorites:AppIntent{staticvartitle:LocalizedStringResource="Open Favorite Trails"staticvardescription=IntentDescription("Opens the app and goes to your favorite trails.")staticvaropenAppWhenRun:Bool= true
@MainActorfunc perform()asyncthrows->someIntentResult{
navigationModel.selectedCollection = trailManager.favoritesCollection
return.result()}@DependencyprivatevarnavigationModel:NavigationModel@DependencyprivatevartrailManager:TrailDataManager}
The problem I'm running into is that LocalizedStringResource is something that can only handle compile-time values, which means I can't use MR.strings().someString.desc().localized(). I did try passing the generated key someString, but it doesn't seem like the framework knows to look in non-main resource bundles.
Is there a way for moko resources to write its strings to the main resource bundle, or a way I can tell my iOS app to search other bundles when looking for localization keys?
The text was updated successfully, but these errors were encountered:
I've been looking into adding Shortcuts integration to my app on iOS. The Apple documentation shows an example for AppIntent here:
You're then supposed to add that struct to an
AppShortcutsProvider
implementation: https://developer.apple.com/documentation/appintents/appshortcutsprovider.The problem I'm running into is that
LocalizedStringResource
is something that can only handle compile-time values, which means I can't useMR.strings().someString.desc().localized()
. I did try passing the generated keysomeString
, but it doesn't seem like the framework knows to look in non-main resource bundles.Is there a way for moko resources to write its strings to the main resource bundle, or a way I can tell my iOS app to search other bundles when looking for localization keys?
The text was updated successfully, but these errors were encountered: