[英]Read Build number from .xcconfig file like Version number in Xcode
i created this Release.xcconfig
:我创建了这个
Release.xcconfig
:
SB_APP_NAME = Test
SB_APP_VERSION = 0.5
SB_APP_BUILD = 5
SB_APP_BUNDLE_ID = com.test.ios
and now i can use SB_APP_VERSION
in info.plist
like this:现在我可以像这样在
info.plist
中使用SB_APP_VERSION
:
but i can't find any key for build number
in plist
file to replace it from my xcconfig
file.但是我在
plist
文件中找不到任何内部build number
的密钥来从我的xcconfig
文件中替换它。
as you can see, we have Version
and Build
in General
tab of project.如您所见,我们在项目的
General
选项卡中有Version
和Build
。 i want to read this number from xcconfig
我想从
xcconfig
中读取这个数字
If we see in info.plist
file, we can find Bundle version string (short)
and Bundle version
.如果我们在
info.plist
文件中看到,我们可以找到Bundle version string (short)
和Bundle version
。 so:所以:
Bundle version string (short)
=> App Version
( in general tab ) ( like 5.3.1 ) Bundle version string (short)
=> App Version
(在一般选项卡中)(如 5.3.1)
Bundle version
=> App Build
( in general tab ) ( like any int number ) Bundle version
=> App Build
(在一般选项卡中)(就像任何整数一样)
So we can replace Bundle Version
value as $(SB_APP_BUILD)
所以我们可以将
Bundle Version
值替换为$(SB_APP_BUILD)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.