Unable to localise CFBundleName on iOS Home Screen in en-US

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?

Answered by DTS Engineer in 830613022

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.

What you described does sound like a bug. If you can provide the minimal project you mentioned, with detailed steps you used to reproduce the issue, I'll be interested in taking a look.

Your post can contain a link to where your test project is hosted. You can also start with filing a feedback report with the project and share your report ID here.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Thankyou for the quick response. I will be sure to file a feedback report and will post the report ID once I have done so. Also, I should maybe have said, I have already sent a Code Level Support request regarding this issue; if it would be appropriate to post the case ID here I can do that too.

In the mean time, I have the following set of instructions I wrote earlier that should contain all of the info needed to reproduce the problem:

Project Creation

Open xcode (I am on version 16.2)

Click Create New Project...

Change platform to iOS, select the App template, Click Next.

Fill out the options form as follows:

Product Name: locale-name-changing-test
Team: None
Organization Identifier: com.testapp
Interface: Storyboard
Language: Swift
Testing System: None
Storage: None

Click Next.

Find an appropriate folder. Click create.

In the project navigator, ctrl+click on the folder
locale-name-changing-test.xproj/locale-name-changing-test,
then click New File from Template...

Select String Catalog, tap Next.

Name the string catalog, InfoPlist.xcstrings

Tap Create.

Click on the new InfoPlist.xcstrings file to open it.

In the default en locale add the key CFBundleName, and set the value to Default Name.

By clicking the '+' icon at the bottom of the screen, Add English (United Kingdom) (en-GB) as a locale. Set the CFBundleName key to the value UK Name.

By clicking the '+' icon at the bottom of the screen, Add English (United States) (en-US) as a locale. Set the CFBundleName key to the value US Name.

Run the project

Open a simulator (in my case an iOS 18.3, iPhone 16 Pro).

In the simulator, open the Settings app > General > Language & Region. Set the preferred language to English (UK). Remove any other languages in the preferred language list.

From Xcode, press the run button to build/install/run the app on the simulator.

The app name on the Home Screen is "UK Name".

Long press the app icon > tap Remove App

A modal appears which says Remove "UK Name"?. > Dismiss the modal.

In the simulator, go back to the Settings app > General > Languages & Region. Set the preferred language to English (US). Make sure English (US) is the only language in the preferred languages list.

Go back to the iOS Home Screen.

The app is named "Default Name".

Long press the app icon > tap Remove App

A modal appears which says Remove "US Name"?.

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.

Unable to localise CFBundleName on iOS Home Screen in en-US
 
 
Q