60
votes

I'm trying to submit my iOS app in Xcode6. When I click Submit or Validate in the organizer, a window pops up that says:

Failed to locate or generate matching signing assets:

Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues:

No matching provisioning profiles found for "Applications/MyApp.app”

None of the valid provisioning profiles allowed the specified entitlements: application-identifier, beta-reports-active, keychain-access-groups.

I have created a distribution provisioning profile for this app in the member center and it appears in Xcode. I've looked around and have not found anything online that has told me how to fix this. Can anyone help? Thanks.

Andy

18

18 Answers

57
votes

There's a couple possibilities for your issue, but the main causes is what I got from experience as well as other SO answers.

  1. Your certificate or profile is outdated, in which case you have to go and regenerate your profiles again. I had this problem before, but Apple has described (partially) this issue.
  2. You haven't set your profile in the Build Settings/Code Signing area, along with the appropriate certificates. Verify your Team in General/Identity and ensure that your profile is properly set.

    From Xcode 5: Code signing entitlement errors (The image is a bit outdated, but its the same as Xcode 6): Build Settings Code Signing section

  3. You are using a beta version of Xcode.
  4. @jaytrixz states: "I just removed Entitlements.plist in Code Signing Entitlements under Build Settings" which could possibly work. Be sure that your provisioning profiles are configured as well.
41
votes

As jaytrixz, wrote in the comments...

"I just removed Entitlements.plist in Code Signing Entitlements under Build Settings "

I did the same and it worked after an hour of trying other things!

8
votes

There are a lot of answers here, some have worked for me in the past, but not this time. I'd even created a new provisioning profile but that still did not help. Based on the "None of the valid provisioning profiles allowed the specified entitlements" part of the error I tried the following on a hunch and it worked for me:

1. add and remove a particular Capability

Go to Targets > Capabilities, and turn one on and then off.
I doubt it matters which you choose, I added "Push Notifications" (which I don't need for my app), once it was "ON", I changed it back to "OFF"

enter image description here

2. Archive again

I am now successfully uploading my app to the store.

5
votes
3
votes

If you are sure you have valid certificate and provisioning profile, then you may need to do the following:

I would suggest people to refresh the link between xCode and developer account by doing the following:

Go to Xcode -> Preferences -> Account -> View details -> (Refresh icon)

Otherwise you may not be able to see the provisioning profile as an option in the build settings (You may only see old profiles)

A lot of times it gives me connection error, you may need to retry.

Do this refresh every time you edit the provisioning profile or certificate online on apple developer member center

2
votes

If certificates and build setting are all good, and you are part of multiple teams, make sure to select the proper team for the app. Clean and archive again.

2
votes

I had another cause for this problem.

I had 3 different Configurations (Debug, AdHoc, AppStore). I accidentally had the AdHoc Configuration selected in the Archive Scheme setting and tried to upload the generated archive to the AppStore.

So setting the Archive configuration to AppStore solved the problem for me.

enter image description here

2
votes

It's the year 2017, and the provisions are still not just working. I had to put them on manual mode because automatic didn't worked after struggling half an hour. I have no idea what are those entitlements, i have no entitlements file.

1
votes

After trying every possible fix in the world, I ended up just adding this to the entitlements file:

<key>beta-reports-active</key>
<true/>

Find the right entitlements file by looking in Targets > Build Settings > Code Signing > Code Signing Entitlements.

Maybe it's something to do with this Apple doc, although I couldn't follow the instructions fully as certain things were missing in XCode 7 (e.g. the refresh icon in Preferences > Accounts).

1
votes

Another possible cause for this message is if you accidentally did remove the 'target inclusion checkbox' for the entitlement file – in that case the error message is slightly misleading...

1
votes

In my case, the problem was caused by different Bundle Identifier in Target General tab than in Build Setttings.

0
votes

If you have only development provisionning profile, just create distribution also

0
votes

I played with fastlane gym, and there it gave some interesting insights:

There was an error exporting your application Unfortunately the new Xcode export API is unstable and causes problems on some project You can temporary use the :use_legacy_build_api option to get the build to work again

This is the according Bug-Report. Seems to be unfixed for month. https://openradar.appspot.com/radar?id=4952000420642816

Building the app in legacy mode worked for me.

gym --use_legacy_build_api true

Hope, this helps anyone.

0
votes

In my entitlement file for Health kit there was development key. I removed that and my problem resolved.

I hope this answer could help :)

0
votes

There seem to be many possible causes of this error.

In my case, my app was an Enterprise release and I was clicking "Validate" when I should have been heading straight to "Export".

I found this in the Apple docs:

Validate or Submit is not intended to be used with Development, Ad Hoc or Enterprise builds. Ad Hoc or Enterprise distributions should skip straight to Export.

Source: https://developer.apple.com/library/content/qa/qa1830/_index.html

0
votes

I ran into this issue using App Groups. To resolve, I had to log into developer.apple.com and reassign the App Group ID to my App ID.

-1
votes

If other solutions do not work, try going to XCode -> Preferences -> Accounts -> View Details

Now look in Provisioning Profiles section. If your provisioning profile has an action button of 'Download', click the button and download. Then try again

-1
votes

Create a new provisioning profile

This solution worked for me when I had this problem.

Step by step :

enter image description here

  1. log onto the apple developer portal and go here : https://developer.apple.com/account/ios/profile/production

  2. Click the [+] add button and fill in a new profile name and select your app ID

  3. Click the Download button, and once it has downloaded double click to open that file in Xcode

  4. Re-Archive, and this time you should be able to upload succesfully to the store