1,xcode项目先打包试一下可以打包成功
2,创建一plist导出文件
3,xcodebuild命令直接运行
导出文件内容:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>provisioningProfiles</key>
<dict>
<key>com.xxx.ical</key>
<string>qicalADHoc</string>
</dict>
<key>compileBitcode</key>
<false/>
<key>method</key>
<string>ad-hoc</string>
</dict>
</plist>
命令如下:
xcodebuild archive -workspace TableView.xcworkspace -configuration Adhoc -scheme TableView -archivePath TableView.xcarchive PROVISIONING_PROFILE_SPECIFIER="qADHoc"
xcodebuild -exportArchive -archivePath TableView.xcarchive -exportPath ./ -exportOptionsPlist plist PROVISIONING_PROFILE="qADHoc"