Xcode 8 shows error that provisioning profile doesn't include signing certificate
Solution 1
To fix this,
I just enable the "Automatic manage signing" at project settings general tab, Before enabling that i was afraid that it may have some side effects but once i enable that works for me.
Solution 2
There are many ways to fix this, like enabling automatic signing etc. But if you want to understand the reason for this error you need to look at the error message.
It says that the provisioning profile you have selected in the "General tab", does not contain the signing certificate you selected in the "Build settings" -> "Code Signing Identity".
Usually this happens if a distribution certificate has been selected for the debug identity under "Build settings" -> "Code Signing Identity".
If this happens under "Signing (Debug)" it might also be that the "Signing Identity" -> "iOS Development" is not included in the provisioning profile.
Solution 3
Check your keychain for identities that are missing a private key. I had multiple distribution certificates installed for the same team, one of which was missing the private key. Xcode was only checking the first matching identity in the keychain and automatically using this as opposed to the one that did include the private key.
Removing the matching identity that didn't have a private key made Xcode detect the correct identity again.
Solution 4
For those who should keep using not auotamatic for some reason
Open keyChain Access to see whether there are two same Certifications ,If there's two or more,Just Delete to one and it will work :)
Solution 5
I experienced this issue after recently updating Xcode to version 9.3 The issue was in code signing (under debug) certificate was set to distribution certificate instead of development certificate so this prevented me from installing the app on my devices.
Here is what I did to solve this issue.
Project -> Targets -> Select your app -> Build Settings -> Code Signing Identity -> Debug -> Double tap "iPhone Distribution" and change it to "iPhone Developer".
Related videos on Youtube
Satish Mavani
iOS and OSX developer. AR is future, https://www.youtube.com/watch?v=y8xxpe3eIkE
Updated on February 18, 2022Comments
-
Satish Mavani about 2 years
Xcode 8 shows error that provisioning profile doesn't include signing certificate.
This issue is with Xcode-8 only with Xcode 7, same provisioning profile showing related identified certificate.
-
pedrouan over 7 yearsYou need to a) update you provisioning profile with desired certificate or b) install the certificate (you may need to migrate it from other mac with private key as well, if it was not originally set up in your mac)
-
Satish Mavani over 7 yearsa) update you provisioning profile with desired certific. - I already did that but not worked b) install the certificate - certificat is already installed, and was created in same machine so i dont need to export any key or something. And as i said there is not any issue with xcode 7 in same machine. that means there is not any issue with installation
-
pedrouan over 7 yearsCheck this, it quite fresh: stackoverflow.com/questions/39565906/…
-
-
Mohsin Qureshi over 7 yearsSolve this issue but got this error, "<unknown>:0: error: Swift does not support the SDK 'iPhoneSimulator9.3.sdk' Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 "
-
Satish Mavani over 7 yearsYou should try by reboot your simulator and deleting derived data.
-
Mohsin Qureshi over 7 yearsI tried, but not worked. its basically showing due to Alamofire. I think swift 3 is not compatible with Alamofire 3.0
-
user3625547 over 7 yearsI did tried same but giving me this error * has conflicting provisioning settings. * is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.
-
Satish Mavani over 7 yearsYou should delete profiles which are created manually, and then try with automatic sign.
-
Thomás Pereira over 7 yearsThank you! Exactly what was happening here
-
Julian K over 7 yearsFor me, I didn't have duplicates, but after deleting and then re-downloading my provisioning profiles, it seemed to work properly.
-
Silom over 7 yearsWorst idea, you lose all your configs by letting xcode handle your cert. Lazy bastard Xcode will just generate new certs!
-
Silom over 7 yearsKeychain shouldn't let you add multiple copies of one file. Everytime I set up a project from scratch he got crazy with errors, just because some files are twice in keychain. FOR YEARS NOW -.-*
-
Ron Myschuk over 7 yearsI tried everything else and nothing worked until deleting the existing profiles and letting Xcode re-download them
-
aepryus over 7 yearsA dialog box came up asking if I wanted to enable automatic signing. Even though I hit cancel, this still worked.
-
Satish Mavani about 7 yearsSame like I showed in the screenshot above. Are you facing any trouble, @JamesWierzba?
-
Loke about 7 years@JamesWierzba it's in General->Signing. Just as in Satish Maven's answer above.
-
Xerri about 7 yearsI'm trying to use Xcode to build an iOS application using Ionic 2. Where can I find these options in Xcode 8.2.1?
-
Chen Li Yong about 7 yearsSorry, how can I access this ~/Library/MobileDevice/Provisioning Profiles ? I search on my finder and couldn't find any "Library" folder.
-
Ash about 7 yearsDid not fix the problem for me. This is likely one of those issues that can occur from multiple root causes.
-
Yurii Koval about 7 yearsAfter removing old keys from keychain access error still occurred. Xcode Preferences > Accounts > remove Apple ID and simply adding again solved the problem.
-
RAM237 about 7 yearsAll my certs have private keys, so definitely the cause can be different.
-
RAM237 about 7 yearsIn my case was several Certs (=signing identities) in login keychain with the same name, but of different dates (note in System keychain I got only one which was with correct date). Removing all except correct one did the trick.
-
RAM237 about 7 yearsThe most interesting thing is that I haven't changed a single thing in Keychain Access or Xcode for about half of year, so this started to happen just "suddenly". Another interesting thing that my automated process used by Continuous Integration was able to build just fine, so the issue is just GUI related.
-
sinh99 almost 7 yearsBut in my project Source code is on Jinkens server and I don't want to give my account credentials in it, So only need to manage manually. Is there any option for same?
-
funct7 almost 7 yearsExactly what happened to me.
-
bubibu almost 7 yearsGREATEST ANSWER
-
junjie almost 7 yearsSimilar to @RAM237, I've multiple certs with the same name that still have private keys attached. Removing all but the correct one helped.
-
MindWire almost 7 yearsAlso, just flipping between different profiles will fix it. You might also have to clean up keys first per the previous answer.
-
Vee over 6 yearsSimilar to junjie and Ram237 - I had multiple certs that only differed in expiration date; removing the one that wasn't used fixed the issue.
-
J.beenie over 6 yearsYou sir are a certified gangster.
-
tmuecksch over 6 years@ChenLiYong That's a hidden folder. Press
CMD + Shift + .
to show all hidden files. -
Yu-Chih about 6 yearsThis seems a silly way to handle certificates but it is the only solution working in my case. I am using XCode 9.
-
JM-AGMS about 6 yearsThis was so simple yet struggled with this for a while. Thank you, kind sir.
-
Junaid Mukhtar almost 6 yearsWow! This is the actual answer to the question asked. Wondering why it is not the accepted answer. Thanks sir !
-
Almas Adilbek almost 6 yearsThe clever way every clever dev should be.
-
Andreas777 almost 6 yearsThis should be marked as accepted answer, that explains the problem and solution and not random Xcode generation.
-
Carlos Linares almost 6 yearsAfter reading the Build Settings part I realise I can choose what certificate the profiling is using. Thanks.
-
Fiach Reid over 5 yearsThanks! - In my case, under Target > Build Settings > Code Signing Identity > Release was set to iOS Developer instead of iOS Distribution.
-
atereshkov over 5 yearsCan confirm, was the problem in my case too.
-
kamran over 5 yearsThis is how true concept fixes the problem. (3)
-
Nasir about 5 yearsperfect answer,
-
carlosx2 about 5 yearsAfter a day found your solution and worked perfectly
-
Ioan Moldovan about 5 yearsGreat. It worked perfect. Why doesn't this accept as right answer?
-
Amadeu Cavalcante Filho almost 5 yearsThanks! It was exactly what I needed.
-
Minh Thai over 4 yearsThis is exactly the issue in my case, I had a confusion when setting up Fastlane Match and ended up having 3 duplicate keys in my Keychain
-
Nebojsa Nadj about 4 yearsThis! I was having the same issue, your answer made me double check. Thanks!
-
Berk Kaya over 3 yearsThis one is the only real solution here.
-
WaltersGE1 about 3 yearsIndeed! @bubibu Currently my favorite SO answer of all time.
-
Jongers about 3 yearsThe only solution that worked for me after 4 hours of finding solutions on the internet.
-
KamyFC about 3 yearsThis worked fine. Always check - Code Signing Identity
-
wuf810 almost 3 years@ChenLiYong Use "Go to Folder…" from the Go menu (in Finder) and paste in "~/Library/MobileDevice/Provisioning Profiles"
-
Chen Li Yong almost 3 years@wuf810 thank you. I have found it using the
CMD + Shift + .
trick. -
Kudos over 2 yearsThanx Buddy It worked.
-
Dani about 2 yearsI still get
error: Provisioning profile "iOS Team Provisioning Profile: my.org.appName" doesn't include signing certificate "Apple Development: Dev Team Name (TEAMID123)". (in target 'My App Target' from project 'MyProject')
. what to do? -
Dani about 2 yearswhat type of certificates am I looking for?
-
Tyler almost 2 yearsHad to go to "Build Settings > Signing" and set every field to "Apple Development".
-
mythicalcoder almost 2 yearsSometimes it turns out the most simple answer works the best