前几天苹果开了发布会,Xcode也开始升级.发现升级结束后脚本打包编译失败,特查找原因现记录如下:
原来xcodebuild命令对 -exportOptionsPlist 有了新的更改,exportOptionsPlist原先并没有把打包用的证书和描述文件整合到plist文件中,升级Xcode9后相应的plist的结构进行了更改,增加了2个字段一个是signingCertificate另一个是provisioningProfiles.
signingCertificate是一个字符串属性,填写的是证书名字,provisioningProfiles是字典形式,填写的方式是以bundleID为key值,以描述文件的UUID或者名字为value的.整体的表现如下可以参考:

整体的打包脚本:
xcodebuild -workspace xxxx.xcworkspace -scheme xxxx -configuration Release archive -archivePath ${archivePath} -derivedDataPath ${dataPath}
xcodebuild -exportArchive -archivePath ${archivePath} -exportPath ${ipapath} -exportOptionsPlist ${exportOptionsPlist}
有问题可以在下方评论,我会及时回复的.
网友评论