0

I've defined BUNDLE_DISPLAY_NAME -> XXX as a user defined settings in my target's build settings. Now in my info.plist file I've used it as Bundle display name -> ${BUNDLE_DISPLAY_NAME}. And in my InfoPlist.strings file I've used "CFBundleDisplayName" = "${BUNDLE_DISPLAY_NAME}".

Now the problem is when I run my app, app name appears as ${BUNDLE_DISPLAY_NAME} instead of XXX. But if I remove InfoPlist.strings declaration it works fine and displays correct name i.e. XXX. So there is a problem the way I declare it in InfoPlist.strings but I don't know what?.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Bhavesh
  • 1,422
  • 1
  • 12
  • 31
  • 1
    The problem is that you are trying to localize a Build Setting, which can't be done. If you want to use a **User-Defined Build Setting** as your `CFBundleDisplayName`, then it's going to be a static string. Build Setting variables (e.g. `$(PRODUCT_NAME)`) won't be replaced in `InfoPlist.strings` (or any `.strings` file for that matter). – Ryan Maloney Apr 08 '19 at 17:21
  • If you want to localize your app's display name, that is answered here: https://stackoverflow.com/questions/2871990/how-to-localize-bundle-display-name-in-iphone-app – Ryan Maloney Apr 08 '19 at 17:22

1 Answers1

-1

There is no predefined key with ${BUNDLE_DISPLAY_NAME}, you should use $(PRODUCT_NAME) in Info.plist to get the correct name.