How to localise Permissions Usage Description with String Catalog

Hey everyone,

I have translated my app using the newest String Catalog feature but im wondering how can I translate the strings from the Target -> Info tab.

I have read the string catalog documentation and searched on the internet but I can't find a recent post talking about it. I have found methods related to the info.plist file but afaik that would be legacy documentation as I can't even find a info.plist file in my project anymore. Also tried to look for posts talking about it here, but maybe I'm not using the right words as I couldn't find anything.

I only found this article that mentions translating the strings from info but still couldn't see how to do it: https://developer.apple.com/documentation/bundleresources/information_property_list/managing_your_app_s_information_property_list#3375316

So if someone could help me out, it would be very appreciated, thanks.

EDIT: I just followed the "creating a infoplist.strings" way and it worked, but im still wondering if there is a newer way to do it. I tried to just add a manual string in the string catalog using "NSContactsUsageDescription" as key but it didn't work

Hello,

You can use a String Catalog with Info strings by creating a new String Catalog named "InfoPlist.xcstrings", then add it to the relevant target. After each build of your project, Xcode will automatically add known localizable keys from the Info.plist to the InfoPlist.xcstrings.

Hello,

My app employs different Info.plists for various configurations, as setting boolean values from xcconfig is not feasible (specifically, I use UIFileSharingEnabled only during development, not in production). This results in Info-dev.plist, Info-staging.plist, etc.

I attempted the solutions you provided, but unfortunately, they don't seem to work for my scenario. Could you provide any advice on localizing Info.plist keys using the new String Catalog feature?

Ok, I've figured it out. It turns out that Xcode was copying NSBluetoothAlwaysUsageDescription to the project.pbxproj file as INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription. This behavior was causing issues with the String Catalog feature, as it couldn't collect localizable strings from the Info.plist files.

Once I removed the entry from the project file and placed it back in the Info.plists directly, the String Catalog populated correctly.

How to localise Permissions Usage Description with String Catalog
 
 
Q