xcodebuild build -target Unity-iPhone
-scheme Unity-iPhone
-derivedDataPath ~/Desktop/
-configuration Release
xcrun -sdk iphoneos
PackageApplication -v ~/Desktop/Build/Products/throne.app
-o ~/Desktop/throne.ipa
编译的时候可以指定Provisioning和CodeSign,Provision的参数是UUID,Provision安装完之后,会放在~/Library/MobileDevice/Provisioning Profiles目录下,以UUID为文件名;实测后发现,指定Provisioning后,CodeSign指定没有效果,会按照Provision推导出来;
xcodebuild build -target Unity-iPhone
-scheme Unity-iPhone
-derivedDataPath ~/Desktop/
-configuration Debug
PROVISIONING_PROFILE=36516e39-5229-4c6e-9c98-120e863c9304
CODE_SIGN_IDENTITY="iPhone Developer: XXXXXX(XXXXX)"
麻烦的地方是编译时指定的是Provision的UUID,打包的时候指定的是Name;好处是,xcrun的使用说明怎么也没找到,用xcodebuild更明白一些;
xcodebuild -scheme Unity-iPhone
archive -archivePath ~/Desktop/
-configuration Debug
PROVISIONING_PROFILE=36516e39-5229-4c6e-9c98-120e863c9304
xcodebuild -exportArchive
-exportFormat ipa
-archivePath ~/Desktop/throne.xcarchive/
-exportPath ~/Desktop/throne.ipa
-exportProvisioningProfile "fwdevelopmentprofile"
$ xmllint <(security cms -D -i your.mobileprovision) --xpath '/plist/dict/key[text()="UUID"]/following-sibling::string[position()=1]/text()'
$ xmllint <(security cms -D -i your.mobileprovision) --xpath '/plist/dict/key[text()=“Name"]/following-sibling::string[position()=1]/text()'