I have a project from which I'm trying to export an Enterprise archive.
This works perfectly via the Xcode interface (Xcode Version 9.3 (9E145)), but I'm trying to do it via the command line (so I can automate this on our CI).
I'm exporting the same archive as from inside Xcode, so I'm reasonably sure the archive itself has been created correctly.
The command I'm running is
xcodebuild "-exportArchive" "-archivePath" "archive.xcarchive" -exportPath . -exportOptionsPlist ./export_options.plist
And the contents of export_options.plist is
<?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>compileBitcode</key>
<false></false>
<key>method</key>
<string>enterprise</string>
<key>provisioningProfiles</key>
<dict>
<key>com.correct.app.identifier</key>
<string>XC iOS: com.correct.app.identifier</string>
</dict>
<key>signingCertificate</key>
<string>iPhone Distribution: MYBRAND</string>
<key>teamID</key>
<string>ABCDEFGHI</string>
</dict>
</plist>
The error I'm getting is
2018-04-07 16:54:02.104 xcodebuild[67144:5293266] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/c4/t3_jplmx5qn7dkxx95rqv2qh0000gn/T/MyBrand_2018-04-07_16-54-02.095.xcdistributionlogs'.
2018-04-07 16:54:04.108 xcodebuild[67144:5293266] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fbf2ad5b240>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
"Error Domain=IDEProfileLocatorErrorDomain Code=1 \"No profiles for 'com.correct.app.identifier' were found\" UserInfo={NSLocalizedDescription=No profiles for 'com.correct.app.identifier' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS In House provisioning profiles matching 'com.correct.app.identifier'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}"
)}
error: exportArchive: No profiles for 'com.correct.app.identifier' were found
Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'com.correct.app.identifier' were found" UserInfo={NSLocalizedDescription=No profiles for 'com.correct.app.identifier' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS In House provisioning profiles matching 'com.correct.app.identifier'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}
** EXPORT FAILED **
I've sanity checked my export from inside Xcode, and it's using the same certificate and provisioning profile as I have specified in my export_options.plist.
Any suggestions anyone?