GENERATE_INFOPLIST_FILE and localizations

I've had the opportunity to start a fresh project for the first time in years, and see that Xcode no longer create an Info.plist file by default, but prefers to generate it automatically based on build settings.

However, I struggle with translating user-facing strings in this new work flow. What am I missing? Should I just turn off GENERATE_INFOPLIST_FILE and create Info.plist and Infoplist.strings the old way?

I want to localize privacy reasons.

Post not yet marked as solved Up vote post of sveinhal2 Down vote post of sveinhal2
2.6k views

Replies

Yes, info.plist does not show immediately in the list of files.

But you can access via the Targets > Info:

Then info.plist should show in the list of files !

You should still be able to manually create an InfoPlist.strings file in your target even if GENERATE_INFOPLIST_FILE is enabled. Alternatively, when you export localization with Xcode by going to Product > Export Localizations... Xcode will automatically generate an InfoPlist.strings file in the exported localization catalog from the localizable Info.plist keys in Targets > Info.

> Should I just turn off GENERATE_INFOPLIST_FILE and create Info.plist and Infoplist.strings the old way?

You should leave this build setting enabled in general. There is no need to create a dedicated Info.plist file just for these strings, as your ability to set the privacy access descriptions are now build settings for each data type. You should set a description in the build settings, as you would for the Info.plist file previously, and then continue to localize it by adding the InfoPlist.strings file as my colleague above recommends.