在執行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的話,都改下。