1.Build Numbers 存储在应用程序的Info.plist中,CFBundleVersion
(Bundle
).
version
2.先在Xcode project中设置agvtool工具可用,target ->Build Settings->combined->Versioning
2.1 Set Current
to a value of your choosing.
Project Version
2.2 Set Versioning
to
SystemApple
.
Generic
3.设置你的version and build numbers.保证 CFBundleVersion
(Bundle
) and
versionCFBundleShortVersionString
(Bundle
) keys存在你的Info.plist中
versions string, short
3.1 target->Info->设置Bundle versions string,short为1.0 Bundle version为1.0
4.用命令行来更新版本号
4.1 打开terminal application ,cd 工程直接路径 例如工程名为AutoCellDemo 则cd
/Users/itdept/Desktop/practice/AutoCellDemo
4.2 更新version number 到2.0 则输入命令:$xcrun agvtool new-marketing-version
2.0
5.更新Build Number
5.1 自动增加你的Build Number 执行的命令:$xcrun agvtool next-version -all
5.2 给你的应用程序设置一个Build number,执行的命令是 $xcrun agvtool new-version
-all 2.6.9
6.查看Version Numbers
6.1查看当前的Version Number 执行:$xcrun agvtool what-marketing-version
6.2 查看当前的Build Number 执行:$xcrun agvtool what-version