Is it possible to use other names for infoplist.strings file?
My problem: I want to create more than one target with different localized app names.
You just create localized version of the same file.
And in there you set the name for each language for CFBundleDisplayName.
For example: In the english file: CFBundleDisplayName = "English name of the app"
In the French file: CFBundleDisplayName = "French name of the app"
iOS will load the proper localization file. And if a language is missing it will use the default language in the info.plist. In my case, it en.
I've had what sounds like the same issue. I'm building two different apps from the same files, just with two different XCode projects, but the InfoPlist.strings files need to be different as they contain the name of the app. A simple solution I found is to use two separate folders inside of which your localized infoplist.strings are. For example:
+Version_A
+en.lproj
InfoPlist.strings
+fr.lproj
InfoPlist.strings
+Version_B
+en.lproj
InfoPlist.strings
+fr.lproj
InfoPlist.strings
Then in each XCode project you simply include the one relevant location (Version_A or Version_B) and not the other. If you do that too, check that the Copy Bundle Resources under your Build Phases pick the correct version (you can click Show in Finder from there).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With