AGVTool的新版本和什么版本不对应 [英] AGVTool new-version and what-version do not correspond

查看:380
本文介绍了AGVTool的新版本和什么版本不对应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我这样做:

  agvtool新版本-all 99 

它更新我的Info.plist文件。但是,如果我这样做:

  agvtool what-version 

  agvtool下一个版本

我收到此错误:

 此项目似乎没有CURRENT_PROJECT_VERSION键设置。 
将此键添加到目标的专家构建设置。

为什么不对应。我必须使用plist命令行工具才能检索我的应用程序的当前版本。好奇地 agvtool what-marketing-version 工作正常。讽刺agvtool似乎没有版本本身; - )

解决方案

这个链接对我有用技术问答QA1827使用agvtool自动更新版本和版本号



从链接是以下。这有助于解决我开始使用agvtool时的问题。


  1. 启用agvtool。

您的目标的Build Settings窗格,然后更新您的所有构建配置。



将当前项目版本设置为您选择的值。我将我设置为1



默认情况下,Xcode不使用任何版本控制系统。将版本系统设置为Apple Generic确保Xcode将在您的项目中包含所有agvtool生成的版本信息。


  1. 您的版本和版本号。

agvtool会在应用程式的Info.plist中搜寻您的版本和版本号。它更新它们,如果它们存在,什么都不做,否则。确保您的Info.plist中存在CFBundleVersion(Bundle版本)和CFBundleShortVersionString(Bundle版本字符串,短)键


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 ;-)

解决方案

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

这篇关于AGVTool的新版本和什么版本不对应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆