Xcode 8 shows error that provisioning profile doesn't include signing certificate

288,082

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.

Hope this helps for others! enter image description here

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.

enter image description here

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

Share:
288,082

Related videos on Youtube

Satish Mavani
Author by

Satish Mavani

iOS and OSX developer. AR is future, https://www.youtube.com/watch?v=y8xxpe3eIkE

Updated on February 18, 2022

Comments

  • Satish Mavani
    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
      pedrouan over 7 years
      You 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
      Satish Mavani over 7 years
      a) 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
      pedrouan over 7 years
      Check this, it quite fresh: stackoverflow.com/questions/39565906/…
  • Mohsin Qureshi
    Mohsin Qureshi over 7 years
    Solve 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/XcodeD‌​efault.xctoolchain/u‌​sr/bin/swiftc failed with exit code 1 "
  • Satish Mavani
    Satish Mavani over 7 years
    You should try by reboot your simulator and deleting derived data.
  • Mohsin Qureshi
    Mohsin Qureshi over 7 years
    I tried, but not worked. its basically showing due to Alamofire. I think swift 3 is not compatible with Alamofire 3.0
  • user3625547
    user3625547 over 7 years
    I 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
    Satish Mavani over 7 years
    You should delete profiles which are created manually, and then try with automatic sign.
  • Thomás Pereira
    Thomás Pereira over 7 years
    Thank you! Exactly what was happening here
  • Julian K
    Julian K over 7 years
    For me, I didn't have duplicates, but after deleting and then re-downloading my provisioning profiles, it seemed to work properly.
  • Silom
    Silom over 7 years
    Worst idea, you lose all your configs by letting xcode handle your cert. Lazy bastard Xcode will just generate new certs!
  • Silom
    Silom over 7 years
    Keychain 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
    Ron Myschuk over 7 years
    I tried everything else and nothing worked until deleting the existing profiles and letting Xcode re-download them
  • aepryus
    aepryus over 7 years
    A dialog box came up asking if I wanted to enable automatic signing. Even though I hit cancel, this still worked.
  • Satish Mavani
    Satish Mavani about 7 years
    Same like I showed in the screenshot above. Are you facing any trouble, @JamesWierzba?
  • Loke
    Loke about 7 years
    @JamesWierzba it's in General->Signing. Just as in Satish Maven's answer above.
  • Xerri
    Xerri about 7 years
    I'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
    Chen Li Yong about 7 years
    Sorry, how can I access this ~/Library/MobileDevice/Provisioning Profiles ? I search on my finder and couldn't find any "Library" folder.
  • Ash
    Ash about 7 years
    Did not fix the problem for me. This is likely one of those issues that can occur from multiple root causes.
  • Yurii Koval
    Yurii Koval about 7 years
    After removing old keys from keychain access error still occurred. Xcode Preferences > Accounts > remove Apple ID and simply adding again solved the problem.
  • RAM237
    RAM237 about 7 years
    All my certs have private keys, so definitely the cause can be different.
  • RAM237
    RAM237 about 7 years
    In 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
    RAM237 about 7 years
    The 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
    sinh99 almost 7 years
    But 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
    funct7 almost 7 years
    Exactly what happened to me.
  • bubibu
    bubibu almost 7 years
    GREATEST ANSWER
  • junjie
    junjie almost 7 years
    Similar to @RAM237, I've multiple certs with the same name that still have private keys attached. Removing all but the correct one helped.
  • MindWire
    MindWire almost 7 years
    Also, just flipping between different profiles will fix it. You might also have to clean up keys first per the previous answer.
  • Vee
    Vee over 6 years
    Similar 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
    J.beenie over 6 years
    You sir are a certified gangster.
  • tmuecksch
    tmuecksch over 6 years
    @ChenLiYong That's a hidden folder. Press CMD + Shift + . to show all hidden files.
  • Yu-Chih
    Yu-Chih about 6 years
    This seems a silly way to handle certificates but it is the only solution working in my case. I am using XCode 9.
  • JM-AGMS
    JM-AGMS about 6 years
    This was so simple yet struggled with this for a while. Thank you, kind sir.
  • Junaid Mukhtar
    Junaid Mukhtar almost 6 years
    Wow! This is the actual answer to the question asked. Wondering why it is not the accepted answer. Thanks sir !
  • Almas Adilbek
    Almas Adilbek almost 6 years
    The clever way every clever dev should be.
  • Andreas777
    Andreas777 almost 6 years
    This should be marked as accepted answer, that explains the problem and solution and not random Xcode generation.
  • Carlos Linares
    Carlos Linares almost 6 years
    After reading the Build Settings part I realise I can choose what certificate the profiling is using. Thanks.
  • Fiach Reid
    Fiach Reid over 5 years
    Thanks! - In my case, under Target > Build Settings > Code Signing Identity > Release was set to iOS Developer instead of iOS Distribution.
  • atereshkov
    atereshkov over 5 years
    Can confirm, was the problem in my case too.
  • kamran
    kamran over 5 years
    This is how true concept fixes the problem. (3)
  • Nasir
    Nasir about 5 years
    perfect answer,
  • carlosx2
    carlosx2 about 5 years
    After a day found your solution and worked perfectly
  • Ioan Moldovan
    Ioan Moldovan about 5 years
    Great. It worked perfect. Why doesn't this accept as right answer?
  • Amadeu Cavalcante Filho
    Amadeu Cavalcante Filho almost 5 years
    Thanks! It was exactly what I needed.
  • Minh Thai
    Minh Thai over 4 years
    This 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
    Nebojsa Nadj about 4 years
    This! I was having the same issue, your answer made me double check. Thanks!
  • Berk Kaya
    Berk Kaya over 3 years
    This one is the only real solution here.
  • WaltersGE1
    WaltersGE1 about 3 years
    Indeed! @bubibu Currently my favorite SO answer of all time.
  • Jongers
    Jongers about 3 years
    The only solution that worked for me after 4 hours of finding solutions on the internet.
  • KamyFC
    KamyFC about 3 years
    This worked fine. Always check - Code Signing Identity
  • wuf810
    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
    Chen Li Yong almost 3 years
    @wuf810 thank you. I have found it using the CMD + Shift + . trick.
  • Kudos
    Kudos over 2 years
    Thanx Buddy It worked.
  • Dani
    Dani about 2 years
    I 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
    Dani about 2 years
    what type of certificates am I looking for?
  • Tyler
    Tyler almost 2 years
    Had to go to "Build Settings > Signing" and set every field to "Apple Development".
  • mythicalcoder
    mythicalcoder almost 2 years
    Sometimes it turns out the most simple answer works the best