要求
要根据系统的语言更改app的名字
解决方案
在xcode中进行打包前的配置
我用的是xcode11版本
一、Bundle display name
可以通过直接修改Bundle display name来确定app的名称
Bundle name和Bundle display name:
Bundle name - is folder name, where your app (including executable file and all resources) will be stored (Cool Program.app)。
建议不要修改bundle name
Bundle display name - is what will be shown on iPhone screen.
即当你安装该app到iPhone上显示的name。
注意:Bundle Display name must correspond to Bundle name,即bundle display name和bundle name不能相差太远。例如bundle name设置为 TheApplication, 而 bundle display name设置为“金瓶梅”,则apple会拒绝你的app。
二、InfoPlist.strings->CFBundleDisplayName
这种方法较为繁琐,但是可以支持多语言版本名称的设置,即Localization,也先看具体步骤:
-
点击工程-Project-Info-Localizations,添加需要支持的语言。如图所示操作:
-
.新建一个Strings File,命名为InfoPlist.strings(命名必须固定)
- 点击之前创建的InfoPlist.strings - 点击右边的“Localizion”- 添加简体中文
- 分别设置内容
“CFBundleDisplayName” = “APP名称(中文或者其他语言)”;