agvtool new-arketing-version在xcode 13上不工作
由于Xcode 13,默认情况下没有info.plist
。相反,公共字段位于目标编辑器中的目标信息选项卡中,并在项目编辑器中构建设置。仅在还有其他字段时,只有在项目中添加一个分开的info.plist
文件。
当我运行以下命令以在jenkins上设置Marketing_version时,
$ xcrun agvtool new-marketing-version 1.0.0
除非存在键cfbundleshortversionstring
,否则对info.plist
文件没有任何影响。但是,每次我在目标的信息选项卡中更新字段时,info.plist
文件似乎再次重新生成,并且cfbundleshortversionstring
消失了。
因此,我想知道如何通过命令行设置Marketing_version
在这种情况下如何使用AgvTool。任何建议都将不胜感激!
Since Xcode 13, there is no Info.plist
by default. Instead, the common field are in the target’s Info tab, and build settings in the project editor. A separated Info.plist
file is added to project only when there are additional fields.
When I run the following command to set MARKETING_VERSION on Jenkins
$ xcrun agvtool new-marketing-version 1.0.0
It doesn't have any effect on Info.plist
file unless the key CFBundleShortVersionString
exists. But every time I update field in target's Info tab, the Info.plist
file seems to be regenerated again and CFBundleShortVersionString
disappear.
Therefore, I'm wondering is there any suggestion about how to setting MARKETING_VERSION
via command line or how to use agvtool in this case. Any suggestion would be appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确实,在Xcode 13中,AgvTool很难更新营销版本。
为了“修复”它,将
generate_infoplist_file
设置为构建设置
in no。这将阻止Xcode自动生成info.plist。然后创建自己的信息。使用相同的值,它应该有效。Maxime
Indeed, in Xcode 13 agvtool has trouble to update marketing version.
In order to "fix" it, set
GENERATE_INFOPLIST_FILE
to NO inBuild settings
. This will prevent Xcode to generate the Info.plist automatically. Then create your own Info.plist with the same values and it should works.Maxime
如果将
generate_infoplist_file
设置为build设置中的no,它将给您带来下一个错误:无法找到“ ABC.XCODEPROJ /../ no
使用AGVTool来更新营销时版本。If you set
GENERATE_INFOPLIST_FILE
to NO in Build settings, it will throw you the next error:Cannot find "ABC.xcodeproj/../NO
when using agvtool to update the marketing version. The only way I could find to fix this was to manually delete fromproject.pbxproj
all theGENERATE_INFOPLIST_FILE
lines.