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

When executing the ios package, we package the ipa by executing the following command:

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

The following error is reported at the end of the export ipa.

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

The details are as follows:

Solution:

You need to turn off bitcode on Xcode and set it to No. the corresponding bitcodes in project and targets need to be turned off, such as

(because xocde is on by default)

If there are several projects, change them all

Similar Posts: