Shawn
Shawn

Reputation: 2735

Archived succeed, but export failed: cordova build ios --release

Running Cordova 7.0.1, Cordova-iOS 4.5.1, XCode 9. This is my build.json:

{
  "ios": {
    "release": {
      "codeSignIdentity": "iPhone Developer",
      "developmentTeam": "XXXXXXXXXX",
      "packageType": "app-store"
    }
  }
}

I usually have no problem when performing cordova build ios --release. Now all of a sudden I got the following error. Archive succeeded, but export failed. I am not sure if it is related to XCode 9 upgrade.

    error: exportArchive: No profiles for 'xx.xxxxx.xxxx' were found

    Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'xx.xxxxx.xxxx' were found"
    UserInfo={NSLocalizedDescription=No profiles for 'xx.xxxxx.xxxx' were found,
    NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching
    'xx.xxxxx.xxxx'. Automatic signing is disabled and unable to generate a profile. To enable automatic
    signing, pass -allowProvisioningUpdates to xcodebuild.}

Any help would be appreciated. Thanks!

Upvotes: 0

Views: 3013

Answers (2)

chriscant
chriscant

Reputation: 101

According to the answer to this question you need cordova-ios 4.5.2 ie

cordova platform rm ios
cordova platform add [email protected]

if necessary adding to Cordova build.json if you use push:

"debug": {
  "iCloudContainerEnvironment": "Development"
  ...
"release": {
  "iCloudContainerEnvironment": "Production"
  ...

I eventually got the debug and release builds to work. I got the debug build to work by changing my build.json "packageType" from "ad-hoc" to "development". The production build got the same error at first; I eventually used Product > Archive in Xcode and then the cordova command line build worked...

Upvotes: 0

Daniel Owsley
Daniel Owsley

Reputation: 91

The error is telling you to create a provisioning profile. Go to https://developer.apple.com/account/ and create one. Then select that profile in xcode in the codesigning section before you archive it.

Export is the step where your archive is signed with a provisioning profile. When you have xcode open, In the center window select your target. You should see dropdowns that say things like "Identity" and "Signing". You need to select the correct Team that has your provisioning profile.

Upvotes: 1

Related Questions