简体   繁体   中英

Read Build number from .xcconfig file like Version number in Xcode

i created this 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:

在此处输入图像描述

but i can't find any key for build number in plist file to replace it from my xcconfig file.

as you can see, we have Version and Build in General tab of project. i want to read this number from xcconfig

在此处输入图像描述

If we see in info.plist file, we can find Bundle version string (short) and Bundle version . so:

Bundle version string (short) => App Version ( in general tab ) ( like 5.3.1 )

Bundle version => App Build ( in general tab ) ( like any int number )


So we can replace Bundle Version value as $(SB_APP_BUILD)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM