error: exportArchive: The data couldn’t be read because it isn’t in the correct format.


在執行ios 打包的時候,我們通過執行下面的指令來打包ipa:

mkdir arch
archive_path=arch/${app_name}.xcarchive
workspace_name=HPtant
xcodebuild clean -workspace ${workspace_name}.xcworkspace -scheme ${app_name} -configuration $ios_type
xcodebuild archive -workspace ${workspace_name}.xcworkspace -scheme ${app_name} -archivePath $archive_path -configuration $ios_type
echo export ipa ....
xcodebuild -exportArchive -archivePath $archive_path -exportPath arch/target_ipa -exportOptionsPlist ${app_name}/${app_name}/Info.plist

在最后的export ipa的時候報錯如下:

error: exportArchive: The data couldn’t be read because it isn’t in the correct format.

 具體如下:

 

 解決辦法:

需要把xcode上的BitCode關閉,設置成No即可,project和targets里面對應的BitCode都需要關閉,如

 

 

(因為xocde默認是打開的Yes)

 如果有幾個project的話,都改下。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM