AGVTool new-version and what-version do not correspond

孤街醉人 提交于 2019-12-23 08:46:11

问题


When I do:

agvtool new-version -all 99

It updates my Info.plist file. However, if I do this:

agvtool what-version

or

agvtool next-version

I get this error:

There does not seem to be a CURRENT_PROJECT_VERSION key set for this project.
Add this key to your target's expert build settings.

Why does this not correspond. Do I have to use the plist command line tool in order to retrieve the current version of my app. Curiously agvtool what-marketing-version works fine. Ironically agvtool does not seem to have a version itself ;-)


回答1:


This link worked for me Technical Q&A QA1827 Automating Version and Build Numbers Using agvtool

From the link is the following. This help resolve the issue when I started using the agvtool.

  1. Enable agvtool.

Navigate to the Build Settings pane of your target, then update it for all your build configurations.

Set Current Project Version to a value of your choosing. I set my to 1

Set Versioning System to Apple Generic.

By default, Xcode does not use any versioning system. Setting Versioning System to Apple Generic ensures that Xcode will include all agvtool-generated version information in your project.

  1. Set up your version and build numbers.

agvtool searches your application’s Info.plist for your version and build numbers. It updates them if they exist and does nothing, otherwise. Make sure that the CFBundleVersion (Bundle version) and CFBundleShortVersionString (Bundle versions string, short) keys exist in your Info.plist



来源:https://stackoverflow.com/questions/11737325/agvtool-new-version-and-what-version-do-not-correspond

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!