#compile Xcode project
xcodebuild -scheme Unity-iPhone -sdk iphoneos10.0 -archivePath Unity-iPhone.xcarchive -configuration Release PROVISIONING_PROFILE=xxx-xxx-xxx-xxx-xxx archive
#export ipa
xcodebuild -exportArchive -archivePath Unity-iPhone.xcarchive -exportOptionsPlist enterprise.plist -exportPath test.ipa
备注:需要注意的是enterprise.plist文件需要提前创建,此处省略。