Hi,
I have an app that has a different name in en-GB and en-US. In the past I have created localised InfoPlist.strings files,
- InfoPlist.strings (English)
- InfoPlist.strings (English (United Kingdom))
- InfoPlist.strings (English (United States))
and added
- CFBundleName = "Default Name",
- CFBundleName = "UK Name", and
- CFBundleName = "US Name",
for example to each of the three files respectively.
After building/installing/running this has worked as expected; if you set the device language to en_GB the display name on the iOS Home Screen is "UK Name", if you set it to en_AU for example it would be "Default Name" and if you set it to en_US it would be "US Name".
Furthermore, when the name appears in system modals the correct name would appear based on locale too. For example, with the device language set to en_US, if you long press the app icon on the iOS home screen and tap Remove App, a modal will appear which says 'Remove "US Name"?'.
This no longer appears to work correctly. For that same project having made no changes, simply running it on an iOS 17 or iOS 18 device; with the language set to en_US, the name on the home screen will be "Default Name", however, if you again long press and tap remove app, it will say 'Remove "US Name"'. It works correctly for en-GB.
Like I said, I remember this working in the past, so I checked on an old device I have running iOS 15.8.2 as well as a simulator running iOS 15.2 and it does work as expected in both of those cases.
I tried to create a new minimal project to see if something had changed and therefore if the setup I have is now incorrect and saw that the preferred method of localization now involves making a string catalog instead of multiple strings files. For a new project; duplicating the setup at the top of this post using a string catalogue file named InfoPlist.xcstrings results in the same incorrect behaviour when setting the device language to en_US.
I guess my question is, is this a bug in iOS? Or is it likely that I am doing something wrong here?
Thanks for providing the detailed steps. Now I can reproduce the issue.
It is pretty clear to me that the issue is a regression on the system side, and so please share your report ID for folks to track, after you have it.
Worth mentioning, to localize your app name on the iOS Home screen, the standard way is to localize CFBundleDisplayName, though doing it doesn't change anything in this case. Localizing CFBundleName
helps in some cases, especially for a macOS app, and so I typically localize both keys.
Best,
——
Ziqiao Chen
Worldwide Developer Relations.