jenkins打包iOS 報錯:error: exportArchive: The data couldn’t be read because it isn’t in the correct f...

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

mkdir arch
archive_path=arch/${app_name}.xcarchive
workspace_name=HPPlayTVAssistant
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的話,都改下。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章