天天看點

由Archive包導出IPA老的方法 新的方法

老的方法

xcodebuild -exportArchive -exportFormat ipa -archivePath $archivePath -exportPath $exportPath -exportProvisioningProfile "$provisioningProfile"

比如:

xcodebuild -exportArchive -exportFormat ipa -archivePath /Users/sss/Desktop/BFNavigationDemo\ 19-8-15\ 下午10.26.xcarchive -exportPath /Users/sss/Desktop -exportProvisioningProfile b63ad013-8f81-453e-849b-0e26707ed87e.mobileprovision

ProvisioningProfile檔案可以從Xcode去檢視

由Archive包導出IPA老的方法 新的方法

ProvisioningProfile檔案的路徑: /Users/xxx/Library/MobileDevice/Provisioning\ Profiles

由Archive包導出IPA老的方法 新的方法
新的方法

新版本的Xcodebuild,-exportFormat,-exportProvisioningProfile這些參數已經不支援了

xcodebuild -exportArchive -archivePath $archivePath -exportPath $ipaDir -exportOptionsPlist exportOptions.plist
           

比如:

xcodebuild -exportArchive -archivePath /Users/netease/Desktop/BFNavigationDemo\ 19-8-15\ 下午10.26.xcarchive -exportPath /Users/netease/Desktop -exportOptionsPlist xxx/ExportOptions.plist

ExportOptions.plist這個檔案是我們自己建立的,格式如下

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>method</key>
    <string>app-store</string>
    <key>teamID</key>
    <string>xxxxxxxxxx</string>
    <key>compileBitcode</key>
    <false/>
    <key>uploadSymbols</key>
    <false/>
</dict>
</plist>
           

有個比較簡便的方法就是,我們自己使用Xcode導出IPA包後,從IPA包裡把ExportOptions.plist檔案拷貝出來做相應的修改

由Archive包導出IPA老的方法 新的方法

https://www.jianshu.com/p/68c88d0beb91

https://www.jianshu.com/p/4f66ae63de9a