Bundle Display Name in iPhone

2019-07-28 18:11发布

问题:

Is it possible to modify the BundleDisplay name at runtime ???

Thanks

回答1:

I'd be really surprised if you could, since doing so would require you to edit the Info.plist file, which is in a write-protected directory. Even if you could modify it, it would cause the code signature to no longer match the application bundle, and the app would refuse to launch.

The closest you can get to using a different display name is to provide localized versions of it.



回答2:

If you set the Bundle Display Name to a variable ie ${MY_BUNDLE_DISPLAY_NAME} and make sure that gets set in your build phases or from your ENV, or from an XCCONFIG file when building from the command line, the name should be replaced with what you set it with.