ChatGPT解决这个技术问题 Extra ChatGPT

Xcode6 错误:“没有为应用程序找到匹配的配置文件”

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


C
Community

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

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. 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): You are using a beta version of Xcode. @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.


Thanks for your response. My provisioning profiles and certificates appear to be up to date. I've played around with the settings for code signing identity and provisioning profile and nothing that I've tried allows the validation to succeed. And I'm running Xcode 6.1.1 (the released version). Do you or does anyone else have any other ideas? Thanks again.
I figured it out. I didn't create a new archive after setting the certificate and provisioning profile. It works now. Thanks.
Nevermind. I just removed Entitlements.plist in Code Signing Entitlements under Build Settings in Xcode and went thru with the process since the provisioning profile has it configured already.
most useful to understand that the error can be caused by using "development" signing for "distribution" / archive builds -- nothing to do directly with the wrong entitlements, bad provisioning profiles, etc etc. Misdirection by this error message is a total time-killer.
In Xcode 8, I had to uncheck 'Automatically manage signing' and manually specify my distribution certificates and profiles.
t
templeman15

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!


Just make sure your iCloud (if any) works after that.
This worked for me too. I was trying to run HMCatalog (Sample HomeKit database app from Apple). I order to get it to build and run I removed the "HMCatalog.entitlements" value from Targets -> HMCatalog -> Code Signing -> Code Signing Entitlements in xcode project settings.
Thank you! I removed it, added the entitlements back from the capabilities tab and it auto-created a new Entitlements file and submission worked. This may have been because I switched between a beta build of Xcode then back to the regular Xcode to submit.
@user2693091, thanks buddy... its a most helpful answer.
Doesn't this make it so that your entitlements don't work? i.e app groups, push notifications, IAP, etc? - since you are removing the entitlements file from your app
k
kris

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"

https://i.stack.imgur.com/qG1U6.png

2. Archive again

I am now successfully uploading my app to the store.


C
Community

Another solution, that fixed this symptom for me, can be found at: Xcode Watchkit: None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups

Briefly: clear ~/Library/MobileDevice/Provisioning Profiles


s
shbli

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


y
yogoo

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.


J
JulianM

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.

https://i.stack.imgur.com/6VKuX.png


Whats the different between AdHoc & AppStore configuration in Settings?
It depends on what so set it to. This were my custom created profiles. They were nearly identical but I used different Provisioning Profiles on these configurations
How did you set different profile for different config?
In the Build Settings
can u be specific? I can only change build settings on current target. not configuration. It would be helpful.
C
Cristi Băluță

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.


Actually, to solve the same error in my distribution I had to use the manual settings! :-)
D
Dunc

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).


@bruce1337: Thanks, that's actually the same link as mine :)
D
DrMickeyLauer

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...


where is target inclusion check box?
The checkboxes below "Target Membership", either in the Document Inspector (after adding), or under "Options" in the "Add file" dialog.
s
saltwat5r

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


It worked good man For other users if you are not using key chain and other entitlements please remove those from settings and also remove those files from your project.
n
nzackoya

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


n
nodepond

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.


This option was deprecated. use_legacy_build_api | [DEPRECATED!] Don't use this option any more, as it's deprecated by Apple - Don't use this option any more, as it's deprecated by Apple
S
Surbhi Garg

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

I hope this answer could help :)


S
Simon East

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


N
Nate23VT

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.


J
JayBee

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


C
Community

Create a new provisioning profile

This solution worked for me when I had this problem.

Step by step :

https://i.stack.imgur.com/MZEGW.png

log onto the apple developer portal and go here : https://developer.apple.com/account/ios/profile/production Click the [+] add button and fill in a new profile name and select your app ID Click the Download button, and once it has downloaded double click to open that file in Xcode Re-Archive, and this time you should be able to upload succesfully to the store