Dynamically set iOS Bundle Display Name in Xcode 4

2019-09-19 05:17发布

问题:

i would like to know wether it's possible to change the bundle display name of an app by for example. changing a preprocessor macro.

This would be helpful if you need different versions of your app, just to differentiate on your iphone's homescreen.

回答1:

you cannot set the CFBundleDisplayName programatically, however if your application is localized you could set different CFBundleDisplayName values for each language what are in your localization list.

if you upload a new version to the AppStore, theoretically you can change a CFBundleDisplayName for each new version. if you are lucky, the Apple won't complain it.



回答2:

You may not do it dynamically (and especially not with macros; which are a compiler feature, not a runtime feature), however, you can localize your application name. If you wish to change the name of you application, change the value for the info-plist key LSBundleDisplayName.



标签: ios xcode