美文网首页
xcodebuild exportArchive "-

xcodebuild exportArchive "-

作者: Kare | 来源:发表于2018-05-15 22:59 被阅读30次
Night work

更新到Xcode9.0后,之前写的自动打包脚本不可用了。原来的导出命令如下

xcodebuild  -exportArchive \
            -archivePath ${xcarchiveDir} \
            -exportPath ${archive_dir} \
            -exportOptionsPlist ${exportPlist} \ > /dev/null 2>&1

今天运行突然报错,说是需要添加

"-allowProvisioningUpdates"

然后就各种查找资料,找到很多都是使用fastlane来实现打包的,可是我是单纯的使用 xcodebuild打包啊。
在Xcode中找了大半天,也没发现可以更好的添加该属性的地方。
然后查找xcodebuild打包命令

xcodebuild exportArchive --help

看了半天,也没发现有设置改属性地方。
然后就看了看xcodebuild的参数设置,于是加入了

-allowProvisioningUpdates YES

在导出命令后面,居然成功导出不报错了。
最终的导出命令如下:

xcodebuild  -exportArchive \
            -archivePath ${xcarchiveDir} \
            -exportPath ${archive_dir} \
            -exportOptionsPlist ${exportPlist} \
            -allowProvisioningUpdates YES > /dev/null 2>&1

相关文章

网友评论

      本文标题:xcodebuild exportArchive "-

      本文链接:https://www.haomeiwen.com/subject/hlhudftx.html