Ios – Xcode couldn’t find a provisioning profile

cordovaiosiphoneprovisioning-profilexcode

Since the release of Xcode 8, I haven't been able to complete a successful build for my iOS app using Cordova. I'm now using Cordova 7.0.1 and Xcode 8.3.3 and getting the same error on "cordova build ios":

No profiles for 'bundle_id' were found: Xcode couldn't find a
provisioning profile matching 'bundle_id'. Code signing is required
for product type 'Application' in SDK 'iOS 10.3'

I've created and re-created the certificates and provisioning profiles, made sure the correct Bundle ID was selected, double clicked the certificates to install in the Keychain, downloaded the profiles, and nothing seems to be working. I've also tried creating a build.json file in the root directory for Cordova with the following:

{
  "ios": {
    "debug": {
      "codeSignIdentity": "iPhone Developer",
      "developmentTeam": "<team id>",
      "packageType": "development"
    },
    "release": {
      "codeSignIdentity": "iPhone Developer",
      "developmentTeam": "<team id>",
      "packageType": "app-store"
    }
  }

Specifying a "provisioningProfile" with the UUID of the provisioning profile does not help either.

I'm able to complete a build successfully in Xcode and create an archive and install to my device, but it crashes right after the splash screen. Assuming this is because Cordova didn't complete a successful build.

I've been struggling with this for weeks and have been searching forums everywhere and nothing has helped. I've even tried closing and reopening Xcode like a lot of people have suggested and that didn't help either.

Thoughts?

EDIT:

I've tried restarting Xcode a bunch of times after adding provisioning profiles and have also tried removing the iOS platform using Cordova and re-adding. Neither of these options worked.

Best Answer

bundle identifier in Xcode and bundle id would be same. Check it again.