objective-c iPhone XCode - 如何更改应用程序图标下方的标题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2189823/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iPhone XCode - How to change title below app icon
提问by teepusink
What is the best way to rename the app so that the title below the app icon can have spaces but the build files doesn't have spaces. (ie, title is "My Project" and build file is MyProject.app)
重命名应用程序以便应用程序图标下方的标题可以有空格但构建文件没有空格的最佳方法是什么。(即,标题是“我的项目”,构建文件是 MyProject.app)
I changed PRODUCT_NAME but when I do that the app file also contains spaces.
我更改了 PRODUCT_NAME,但是当我这样做时,应用程序文件也包含空格。
Renaming all the fields seems to work fine except I can't find EXECUTABLE_NAME which is the default value for "Executable file".
重命名所有字段似乎工作正常,除了我找不到 EXECUTABLE_NAME 这是“可执行文件”的默认值。
Thank you, Tee
谢谢你,Tee
回答by Nithin
The field that you have to change is the Bundle Display Name(CFBundleDisplayNameis the raw key name) in the info.plistfile from ${PRODUCT_NAME}to 'your desired name'.
你必须改变字段是Bundle Display Name(CFBundleDisplayName是原始密钥名称)的info.plist文件,从${PRODUCT_NAME}到“你要的名称”。
Note: CFBundleDisplayNameis different from CFBundleName. CFBundleDisplayNameis the human visible/marketing name displayed on the device home screen, under the icon etc. While CFBundleNameis the filename of the IPA and the folder for the app on the file system, 'Whatever' for example would be archived as Whatever.ipaand the app would be installed on a device under the folder called Whatever.app.
注意:CFBundleDisplayName不同于CFBundleName. CFBundleDisplayName是显示在设备主屏幕上、图标下等的人类可见/营销名称。虽然CFBundleName是 IPA 的文件名和文件系统上应用程序的文件夹,例如“无论如何”将被存档,Whatever.ipa应用程序将安装在名为Whatever.app.
回答by BillRachel
I'm using Xcode 6 and in the Info.plist, the key is called Bundle Name and the default is $(PRODUCT_NAME). You can double click and change the name, you'll be able to verify it.
我使用的是 Xcode 6,在 Info.plist 中,键名为 Bundle Name,默认值为 $(PRODUCT_NAME)。您可以双击并更改名称,您将能够验证它。
If you view the source code for the plist, you'll see:
如果您查看 plist 的源代码,您将看到:
<key>CFBundleName</key>
<string>Change this to the string to display under the icon</string>
回答by Will
There should really be a caveat here. If you have shell scripts and other things dependent on the original app name, you may be committed to some extensive changes if you pursue the above solution. If you only want to change the display name, and only that, there's a Bundle display name under Info of your target under Custom iOS Target Properties.
这里真的应该有一个警告。如果你有 shell 脚本和其他依赖于原始应用程序名称的东西,如果你追求上述解决方案,你可能会承诺进行一些广泛的更改。如果您只想更改显示名称,仅此而已,则在自定义 iOS 目标属性下的目标信息下有一个捆绑显示名称。


