Xcode方案更改显示名称 [英] Xcode scheme change display name
问题描述
我有一个自定义的Xcode构建方案,该方案可以移动一些文件以在dev和prod变量之间切换。我也可以在开发方案中更改应用的显示名称吗?
I have a custom Xcode build scheme that moves some files to toggle between dev and prod variables. Can I change the app display name in the dev scheme as well?
例如,如果应用程序名称为 MyApp,则当前在主屏幕上显示为 MyApp。我可以配置我的开发构建方案,使其在主屏幕上显示为 MyApp Dev吗?我尝试在操作前构建脚本中设置 TARGET_NAME = MyApp Dev
,但这似乎不起作用。
For example, if the app name is "MyApp", it currently shows up on the home screen as "MyApp". Can I configure my dev build scheme so that it shows up on the home screen as "MyApp Dev"? I tried setting TARGET_NAME="MyApp Dev"
in a pre-action build script, but it doesn't seem to work.
Xcode 7,iOS 9
Xcode 7, iOS 9
推荐答案
您可以轻松地做到这一点。
You can do that easily.
- 向目标添加用户定义的设置(例如DISPLAY_NAME),并为不同的Scheme设置不同的值。
- 转到目标的 Info.plist,然后添加捆绑显示名称键,并将其值设置为 $(DISPLAY_NAME)
这篇关于Xcode方案更改显示名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!