155

Before upgrading Xcode to 7.2, I was using Xcode 7.1.1 to build and distribute apps. I have upgraded to Xcode 7.2 and none of my provisioning profiles (matched to that particular app's bundle ID) match my installed certificates that were working in Xcode 7.1.1.

I only get:

Your build settings specify a provisioning profile with the UUID “some_number”, however, no such provisioning profile was found.

I have tried regenerating a .certSigningRequest to generate a new Certificate and Profile and made sure the Team in the General tab of the target is correct. Whenever I select a Provision Profile, all of my Code Signing Identities appear in the Identities in Keychain, but none of them will pair correctly.

It seems setting the Provision Profile to Automatic and the Code Signing Identity to iOS Developer will resolve this error, but the advantage of managing my Provisioning Profiles is gone as I believe Xcode then manages these.

Any thoughts on why setting my Provisioning Profiles and Code Signing Identities to anything but Automatic and iOS Developer produces this error?

Nishant Bhindi
  • 2,242
  • 8
  • 21
n8yn8
  • 4,467
  • 4
  • 19
  • 20

24 Answers24

333

I also had some problems after updating Xcode.

I fixed it by opening Xcode Preferences (+,), going to AccountsView Details. Then select all provisioning profiles and delete them with backspace (note: they can't be removed in Xcode 7.2). Restart Xcode, else the list doesn't seem to update properly.

Now click the Download all button, and you should have all provisioning profiles that you defined in the Member center back in Xcode. Don't worry about the Xcode-generated ones (Prefixed with XC:), Xcode will regenerate them if necessary. Restart Xcode again.

Now go to the Code Signing section in your Build Settings and select the correct profile and cert.

Why this happens at all? No idea... I gave up on understanding Apple's policies regarding app signing.

iwasrobbed
  • 46,496
  • 21
  • 150
  • 195
s3lph
  • 4,575
  • 4
  • 21
  • 38
  • 1
    Woah, that's weird! I was downloading individual profiles from that same view. I wonder why that wasn't working... And I was so excited that I could just download individual ones instead of cluttering the list with several dozen profiles... – n8yn8 Dec 18 '15 at 00:13
  • 23
    Just deleting the provisioning profiles and downloading again did not help. I have to quit Xcode and reopen again. – Zaartha Dec 30 '15 at 10:10
  • 1
    Great answer, could you add the tip below, to restart XCode? That seems to be the final step in getting this thing working – esreli Feb 15 '16 at 20:35
  • 1
    It worked for me and its awesome answer.......Restarting the xcode was tricky. Thanks man – Gauraw Feb 16 '16 at 11:26
  • 1
    Wow - I wasted an hour trying to fix this before I found your answer which worked great. Why does Apple put us through this?? – Aaron Mar 01 '16 at 22:56
  • Thanks a lot. I also wanted to mention that Xcode automatically revoked one of my Distribution Certificates so keep that in mind. If you have many admins/members in your developer account this can lead to marking some of the provisioning profiles as invalid. Not quite sure that this is true, but I already received some complaints from the account agent – maddob Mar 14 '16 at 13:45
  • @the_Seppi it's of course possible that I've done something wrong, but I don't remember any manual revoking – maddob Mar 15 '16 at 08:57
  • Maybe they just expired? AFAIK, certs are valid for one year before a renewal is required. – s3lph Mar 15 '16 at 09:16
  • 74
    I hate Xcode so much when it comes to distributing to the App Store. When will they ever make this confounding process easier? – markckim Mar 25 '16 at 21:18
  • 1
    Restarting Xcode after downloading all provisioning profiles was what I had to do. – Vee Apr 12 '16 at 16:35
  • I needed to restart my device as well – Oded Harth Apr 16 '16 at 09:09
  • 2
    I can't believe this worked...no idea why Apple's code signing phases are so damn buggy – Halfpint Apr 16 '16 at 12:34
  • 2
    "I gave up on understanding Apple's policies regarding app signing" - You can have a +1 for that alone. My guess is that Apple's policies are mostly there to ensure that developers keep their $100/year Developer Program subscriptions up to date. – aroth Apr 25 '16 at 14:00
  • 21
    Xcode 7.3: You can no longer highlight (or delete?) Provisioning Profiles. Hitting backspace is just ignored. "Xcode. Each release makes you hate it just a little bit more. (tm)" – Mike Gledhill May 12 '16 at 12:46
  • 7
    In Xcode 7.3, instead of hitting backspace, you can right-click on the profile and select "Move to Trash". – Eneko Alonso Jun 21 '16 at 10:38
  • 1
    For me, Delete Profile -> Restart Xcode -> Install Profile -> Archiving .. works! – Zaraki Jun 25 '16 at 07:54
  • 1
    WTF man this worked. Xcode sucks when it comes to app distribution. They could learn a thing or two from android to keep things simple. – Sharp Edge May 29 '17 at 22:48
  • 5
    This answer is outdated as the options Accounts -> View Details suggested in the answer do not exist on the current Xcode. Stack really needs to learn to weed out old responses so they stop appearing as the top result on google. – Ian Steffy Dec 21 '17 at 10:24
66

Try restarting XCode first, before trying these other answers. I was about to follow the advice given in other answers, then noticed multiple people saying that restarting XCode was necessary after all the steps. All I did was restart XCode and it fixed the problem. Who knows if it'll fix the problem for you, but it's worth a shot before trying the other solutions. I'm on XCode 7.2.1.

Tanner Semerad
  • 12,472
  • 12
  • 40
  • 49
36

Keep quitting Xcode until the damn thing works.

SayeedHussain
  • 1,696
  • 16
  • 23
31

I've also the same problem, in Xcode 7.2

It solved by followings steps:-

1) Open Xcode preference,

2) Select the appropriate team,

3) Click the "View Details..".

4) In section "Signing Identities": click on "Reset" for each of them.

5) In section "Provisioning Profiles". Click on "Download All".

6) Click on "Done."

7) Go in Xcode, build settings, select it. In General tab, the issues should get removed.

8) Restart the Xcode.

9) Do the Final build.

That's all.

Meet Doshi
  • 4,241
  • 10
  • 40
  • 81
ArunDhwaj IIITH
  • 3,833
  • 1
  • 24
  • 14
  • 1
    I followed all the steps.. but sill i am getting the same error, even after the restart – Nikesh K Feb 17 '16 at 06:27
  • 1
    restarting xcode was the big one for me... cant believe that apple doesnt even reccomend you to restart it – kareem Feb 28 '16 at 07:37
  • 5
    I also searched the project folder for the UUID string and found it in "project.pbxproj". After blanking it out, build went fine. Change `"PROVISIONING_PROFILE[sdk=iphoneos*]" = "82f0b3c1-a2d2-4202-9326-5eb37d8e41b8";` to `"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";` – davidanton1d Apr 15 '16 at 09:47
  • 1
    Good finding @davidanton1d – ArunDhwaj IIITH Apr 15 '16 at 10:59
  • 2
    I'm on Xcode 7.3 aswell. I followed this tips, and still have the same problem. Xcode. Each year, I hate it just a little bit more. – Mike Gledhill May 12 '16 at 12:49
  • 2
    This is really horrible advice in team environments. Nobody should ever press the magic reset buttons in Xcode. – Mike S Jul 06 '16 at 15:36
  • @davidanton1d that is the ONLY thing that worked for me. Thank you! – Richard Aug 31 '17 at 21:31
8

Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and add it to Keychain access > certificates (which expires on 2023)

Dmitry
  • 14,306
  • 23
  • 105
  • 189
  • This is a separate issue as seen here: http://stackoverflow.com/questions/32821189/xcode-7-error-missing-ios-distribution-signing-identity-for – n8yn8 Feb 18 '16 at 01:08
7

Also after I did all of suggested steps (btw, for some reasons backspace not remove provision profile) error keeping occurring. Until I finally figured out to Restart Xcode. Probably, it should be first step when you're dealing with Xcode :)

alexey.metelkin
  • 1,309
  • 1
  • 11
  • 20
  • I followed all the ideas.. but sill i am getting the same error, even after the restart – Nikesh K Feb 17 '16 at 06:27
  • @NikeshK, If you're sure that everything is correct and this is certainly Xcode bug, then you could try reinstall Xcode. Especially, if you didn't reinstall it for years and only roll updates over. – alexey.metelkin Feb 18 '16 at 16:42
  • @NikeshK, also if your provision profiles was generated before last renewal update of Apple Developer program you also should recreate profiles. I did it like this: go to developer.apple.com, then to Provision Profiles sections, for all of profiles I clicked Edit, Save, Done - nothing changed inside, but expiration date will updated. After this step you need to redownload them through xcode – alexey.metelkin Feb 20 '16 at 21:40
  • 1
    For me also, backspace/delete key did not work. Right click with mouse, and select 'Move To Trash'. – Aswin Kumar Apr 12 '16 at 05:39
5

Using Xcode 7.3, I spent way too much time trying to figure this out -- none of the answers here or elsewhere did the trick -- and ultimately stumbled into a ridiculously easy solution.

  1. In the Xcode preferences team settings, delete all provisioning profiles as mentioned in several other answers. I do this with right click, "Show in Finder," Command+A, delete -- it seems these details have changed over different Xcode versions.
  2. Do not re-download any profiles. Instead, exit your preferences and rebuild your project (I built it for my connected iPhone). A little while into the build sequence there will be an alert informing you no provisioning profiles were found, and it will ask if you want this to be fixed automatically. Choose to fix it automatically.
  3. After Xcode does some stuff, you will magically have a new provisioning profile providing what your app needs. I have since uploaded my app for TestFlight and it works great.

Hope this helps someone.

John Watkins
  • 51
  • 1
  • 4
4

Check your Keychain - look in Login and System keychains for expired certificates or error messages.

I found certs with "this certificate has an invalid user" error messages, and an expired Apple Worldwide Developer Relations Certificate.

Delete them and install the new AWDRC certificate from https://developer.apple.com/certificationauthority/AppleWWDRCA.cer

Then follow the accepted answer to get Xcode to use the new certificates.

Community
  • 1
  • 1
Anthony
  • 435
  • 5
  • 8
  • 1
    This is a separate issue as seen here: http://stackoverflow.com/questions/32821189/xcode-7-error-missing-ios-distribution-signing-identity-for – n8yn8 Feb 18 '16 at 01:07
  • 1
    I didn't get that error message, I got the exact one the OP had. – Anthony Feb 18 '16 at 01:09
3

For me I tried following 2 steps which sadly did not work :

  • deleting all provisional profile from Xcode Preferences Accounts → View Details , downloading freshly all provisional profiles.
  • Restarting Xcode everytime.

Instead, I tried to solve keychain certificate related another issue given here This certificate has an invalid issuer Apple Push Services

This certificate has an invalid issuer

enter image description here

  • In keychain access, go to View -> Show Expired Certificates.
  • Look for expired certificates in Login and System keychains and an "Apple Worldwide Developer Relations Certification Authority".
  • Delete all expired certificates.
  • After deleting expired certificates, visit the following URL and download the new AppleWWDRCA certificate, https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
  • Double click on the newly downloaded certificate, and install it in your keychain. Can see certificate valid message.

enter image description here

Now go to xcode app. target → Build Setting → Provisioning Profile . Select value from 'automatic' to appropriate Provisioning profile . Bingo!!! profile mismatch issue is solved.

Community
  • 1
  • 1
Alphonse R. Dsouza
  • 2,011
  • 1
  • 14
  • 11
  • This was actually a separate issue as seen here: http://stackoverflow.com/questions/32821189/xcode-7-error-missing-ios-distribution-signing-identity-for – n8yn8 Mar 14 '16 at 21:22
  • May be yes,however,at least in my case solving this fixed mismatch provisional profile issue . – Alphonse R. Dsouza Mar 15 '16 at 03:46
  • Which ultimately solved the xcode 7.2 workaround which had forced me to keep xcode 'Code signing' as 'automatic', to run app on devices. – Alphonse R. Dsouza Mar 15 '16 at 04:08
3

In my case, the problem was that the Archive was being built with a different TEAM-ID than the one who generated the Provisioning Profile (Me). Therefore I Got the error:

"No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID, however, no such provisioning profile was found."

To Solve this:

  • Clean and Re-Download your Provisioning profiles from Settings
  • Re-Start Xcode
  • in the GENERAL Tab of the Project properties, got to TEAM:

  • Change the current team to the Same team but the one under the ACCOUNT you generated the provisioning profile with.

  • Clean & Build

  • Viola!

Hope this helps someone.

Hernan Arber
  • 1,626
  • 3
  • 22
  • 35
3

I updated to Xcode v7.3.1 and it solved the issue.

Abdullah Umer
  • 4,234
  • 5
  • 36
  • 65
2

With Xcode 7.2.1, if you are certain that your provisioning profile is correct (it has the correct App ID and certificate, and the corresponding certificate exists in your Keychain Access) then set the Code Signing Identity and set the Provisioning Profile to Automatic.

Hahnemann
  • 4,378
  • 6
  • 40
  • 64
2

What I did was: created a new provisioning profile and used it. When setup the provisioning profile in the build setting tab, there were the wrong provisioning profile numbers (like "983ff..." as the error message mentioned, that's it!). Corrected to the new provisioning profile, then Xcode 7.2 refreshed itself, and build successfully.

Highwood
  • 41
  • 3
2

Solutions described here work, but I want to add that you need to have correct target selected on the top left corner of Build Settings in Xcode. Lost some time figuring this out...

enter image description here

Chuck Boris
  • 1,275
  • 1
  • 11
  • 9
2

In Xcode 7.3 I got the same error, my certificate and provisional profile both were fine still I was getting the same error, I was unable to delete the provisional profile in Xcode preferences, so I tried by right-clicking on the provisional profile which shows the option to move to trash, but when I clicked nothing happened then I closed the preference window and open it again by Command, the provisional profile was gone and download option was visible, I clicked download and it starting working fine

Asad Khan
  • 365
  • 3
  • 7
2

You can easily fix the problem by changing bundle identifier on the Apple web page from com.my.app to com.my.app.iOS. I found this solution at https://forums.developer.apple.com/thread/15712.

trevorp
  • 1,161
  • 1
  • 14
  • 19
pfoster21
  • 46
  • 3
1

When distribute to App Store, you choose Product -> Achieve and encounter "code sign error, no matching provisioning profiles found", if account and downloaded .mobileprovision file is ok. Try click the "Build and Run" button to run it on your phone.

enter image description here

And, a dialog box will popup with a button "Fix", just click "Fix" to do next... Last, your device will have an valid provisioning file. Just do "Product -> Achieve" again, everything is OK!

malajisi
  • 2,165
  • 1
  • 22
  • 18
1

You can also simply go to xcode preferences then accounts and then it may ask you to simply re sign in with your developer profile and then the issues should go away.

Hope this Helps!

Rohan Vasishth
  • 417
  • 6
  • 19
0

For me changing the build configuration from release to Debug solved the issue.

You can find Build Configuration in Edit Scheme -> Run -> Info -> Build Configuration

Clean your project and re run.

0

In addition to what other users posted, make sure the Team selected on the Target settings (General tab) is the correct one. Xcode will complain it cannot find the Provisioning Profile if the profile belongs to a different team than the one selected.

Eneko Alonso
  • 18,884
  • 9
  • 62
  • 84
0

For me nothing above worked with XCode 7.3.1 because I had nothing in provisioning profiles (expired). I had to connect my iPhone to Mac and then click on Fix provisioning profile which created another profile expires in a week.

Manish Jain
  • 9,569
  • 5
  • 39
  • 44
0

For everyone who didn't solve it yet, my Issue was answered by this:

https://stackoverflow.com/a/41202884/3953197

Frederik Witte
  • 1,167
  • 2
  • 11
  • 35
0

After I have a few hours searching and trying I have two solutions 1- run the app using IOS real device. 2- turn off the automatically manage signing, go to https://developer.apple.com/account/resources/profiles/, and create a profile now on the Provisioning Profile import it and done.

-2

For me none of the solution worked, but If i disconnect the phone from laptop and then run the build, it succeeds and then I connect and run on the phone. I still couldn't figure out the final fix.

Robert Columbia
  • 6,313
  • 15
  • 32
  • 40