Error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.)

Error in Xcode Archive / Export Archive step:

▸ Archive Succeeded

e[34;1mExporting ipa from the archive...e[0m

Using export options
Generating export options
using export-method input: app-store
generated export options content:

<?xml version="1.0" encoding="UTF-8"?>
<!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>
	</dict>
</plist> <nil>

[10:54:52] e[32;1mset -o pipefail && xcodebuild "-exportArchive" "-archivePath" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__archive__982827169/ABC.xcarchive" "-exportPath" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__export__457773964" "-exportOptionsPlist" "/Users/vagrant/deploy/export_options.plist" | xcprettye[0m


❌  error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.)


e[33;1mIf you can't find the reason of the error in the log, please check the raw-xcodebuild-output.log
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variablee[0m
e[33;1mAlso please check the xcdistributionlogs
The logs directory is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_IDEDISTRIBUTION_LOGS_PATH environment variablee[0m
e[31;1mExport failed, error: exit status 70e[0m

Also related:

2016-06-12 20:45:40.494 xcodebuild[3717:12709] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7f8989c2a750>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}

In both cases Xcode does not print an exact error message right into the log.

The first step if you have an error like these is to check the raw-xcodebuild-output.log, as mentioned in the log, and if that wouldn’t help also check the “Xcode distribution logs”.

These are separate files, generated during the build but not printed by xcode (or xcpretty) into the main log.

To get these files all you have to do is adding a Deploy to Bitrise.io step, after the Xcode Archive / Export Archive step (can be the very last step). You don’t have to change any option of the Deploy to Bitrise.io step, it’s configured by default to run even if a previous step fails, and the Xcode steps save these additional logs into the default Deploy directory, which is set to be deployed by the Deploy to Bitrise.io step.

If you have the Deploy to Bitrise.io step in your workflow and you run a build, these additional log files will be attached to the build by the Deploy to Bitrise.io step, as artifacts of the build.

To check these files simply:

  1. Open the build’s page
  2. You should see these files in the Apps & Artifacts section, on the build’s page

The raw-xcodebuild-output.log file can be viewed right on the web UI, as it’s a single log file.

If that wouldn’t help and you have to check the Xcode distribution logs, those are attached to the build as a ZIP file (xcodebuild.xcdistributionlogs.zip). Simply download and extract it, then check the files (Xcode generates separate distribution log files, the ZIP should include all of those).

A detailed error message should be included in either of these files (in which file, that depends on the exact error). If you still can’t find the cause of the error, please let us know!

IDEDistribution.critical.log - Can’t find any applicable signing identities for items / No matching provisioning profiles found

If you’d have Can't find any applicable signing identities for items or No matching provisioning profiles found in the IDE distribution logs (IDEDistribution.critical.log most likely) then the issue is related to a missing distribution certification or provisioning profile (usually to the profile).

Solution: please make sure that the related distribution provisioning profile is uploaded to bitrise.io, e.g. by downloading it from the Apple Developer Portal and then upload it to your project on bitrise.io (in the Workflow Editor - Code Signing & Files section).


If uploading it manually did not solve the issue, or you don’t want to manually download the file from Apple Dev Portal: please make sure that you can archive and export an IPA from the project on your Mac with the signing type you used in the build.

E.g. if you set the signing type in the Xcode Archive step to app-store then make sure that you can export an IPA with App Store signing on your Mac.

Which type of signing was attempted is included in the log, usually a bit above the error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.) error line. E.g.:

Exporting ipa from the archive...

Using export options
Generating export options
using export-method input: app-store
generated export options content:

<?xml version="1.0" encoding="UTF-8"?>
<!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>
	</dict>
</plist> <nil>

This one was an app-store distribution config.

Once you get the signed IPA just run codesigndoc on your project as described in this guide http://devcenter.bitrise.io/ios/code-signing/ and upload all the files collected/exported by codesigndoc to bitrise.io!

That’s all, usually this solves the issue, unless you use separate Apple Dev Teams for development and distribution.

If you have any questions just let us know below!