I updated my Xcode to version 8 after iOS 10 release. Apple made some changes in code signing process and it is now available in general section of target settings. But the
I was facing the same problem, I also tried removing all certificates from my login keychain, but the problem was still coming... Then, luckily one day, I opened system keychain and found that there were more than one distribution certificates added there.I deleted those from there. And then the problem got finally solved :)
So, if you are facing this problem, make sure you delete your certificates from login as well as system keychain and add them again to the login keychain. Hope it helps.
Ok, if you don't want delete all the previsional profiles and certificates, neither use Automatic Provisional Profiles, try this steps:
Delete Provisional Profile from Accounts (cmd + ,), where you can see the list of the all Provisional Profiles according with your user.
Delete the Certificate from Keychain (Login - Certificates - Search the Certificate that is causing conflict)
From Developer Panel (Certificates, IDs & Profiles - Provisioning Profiles) enable your Provisional Profile that are giving you conflict with the Certificate that you want to use.
Download manually you Provisional Profile (it should be green color in its indicator).
From Developer Panel, go to Certificates section and download the Certificate that is associated with the Provisional Profile that you updated in the previous step.
Double click to Certificate that you downloaded to install and verify that it is in the Keychain
Double click to Provisional Profile that you downloaded.
Go to Xcode (Project - Targets - General) and in the section named "Singing (Debug or Release)" you will can see in Elegible the new Provisional Profile.
It see that you need to update both of them (Certificate and Provisional Profile), but if you delete one, the another one keep the previous references and Xcode not update automatically. I did this and it works perfectly.
As @mgentilc says, automatic signing works. Simply enable Automatically manage signing in General -> Signing, Xcode will create and update profiles, app IDs, and certificates automatically.
Following the steps below:
I faced this too, and fixed it by:
1- removing all certificates of my account from keychain,
2- removing all provisioning profiles from xcode and then
3- downloading provisioning profiles again via xcode and also
4- adding certificates again to the keychain.
This problem is due to private key in the certificate in your profile not match that in your keychain. I resolve this by