I'm localizing a flutter app. In Android all works fine, and iOS the strings are translated as expected from the .arb files. However, I don't see how to translate the strings that are in info.plist - NSAppleMusicUsageDescription, NSBluetoothAlwaysUsageDescription etc. - that are used during installation to describe the permissions the user must grant.
I've tried the answers in How to localise a string inside the iOS info.plist file?, including the last one from YodagamaHeshan that applies to XCode 15+, but nothing is working. The strings are simply not displayed during installation.
Could someone provide, or point me to, a step by step procedure that will work with XCode 15? Or is there debug output somewhere that could tell me where the process is failing?
I was able to get this to work. I don't know if this is the best way, but it seems to do the job:
Manually create files named "InfoPlist.strings" for each supported language. Create them in directories named ".lproj"; for example, the one for english would be "en.lproj/InfoPlist.strings".
Add a line to each of these files for each entry you are going to use; for example:
NSAppleMusicUsageDescription = "My description text";
Change the Info.plist file to reference these entries, for example:
<key>NSAppleMusicUsageDescription</key> <string>$(NSAppleMusicUsageDescription)</string>
I had to manually add the .lproj folders to the xcode project by dragging them into the navigator.
I had to manually include the folders in the project by checking the Target Membership checkbox for each of them. Without this step, none of the above does anything.
There may well be a more correct way to accomplish all this, but the above procedure worked for me.