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

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.

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.

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.

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.

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

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

I unchecked and then checked the "Automatically manage signing" option. That fixed it for me.

For what it's worth automatic signing failed every time until I just manually deleted local profiles in:
~/Library/MobileDevice/Provisioning Profiles
After that automatic signing worked perfectly and it got the right profiles from Apple's servers.
This was affecting only some builds, notably the ones for which I had manually created profiles for watch app.

If you use manual signing (which I would definitely encourage), this error may occur because Xcode thinks that it should sign a release build with a developer certificate, which is obviously not included in a release provisioning profile.
There is a build setting that defines which certificate should be used for which build configuration. To change it, go to build settings and search for Code Signing Identity. When expanded, there should be separate rows for each build configuration (usually Debug and Release) with in the second column its selected identity (usually iOS Developer or iOS Distribution). Make sure that it's set to the correct identity for each build configuration.
In some cases, the build configurations can also be expanded. Make sure that also its subitems are set to the correct identities.

Had the same error.
Profiles seems renewed, new certificates added, i even checked it when download. Also revoked former developer's certificates, excluded from provision profile.
But Xcode still asking me about previous certificates with error:
No certificate for team 'MY_TEAM' matching 'iPhone Developer: FORMER_DEVELOPER' found
so, what I did to fix it:
Go Build Settings -> Signing -> Code Signing Identity
Find all 'FORMER_DEVELOPER' certificates and choose needed.
Hope it will help somebody.

For those who still struggle with this problem in Xcode8. For me was a duplicate Certificate problem, this is how I solved it:
I read the answer of Nick and then I began my investigation. I checked all the keys and Certificates in my particular case (inside ~/Library/Keychains/System.keychain).
When I opened the file, I found that I had two iPhone Distribution Certificates (that was the certificate that Xcode was requesting me), one with the iOS Distribution private key that I have been using since the beginning, and another iPhone Distribution Certificate which its private Key had a name (iOS Distribution:NAME) that wasn´t familiar for me. I deleted this last certificate, started Xcode again and the problem was gone. xCode wasn´t able to resolve that conflict and that´s why it was giving signing certificate error all the time.
Check your keychains, maybe you have a duplicate certificate.

You may also solve code signing issues with great Fastlane toolkit. Authors put a lot of effort to effectively automate building, signing iOS apps (and more).
So in the mentioned suite, there is tool sigh which magically resolves any signing issues, hence the name :) Nice thing here is, that this tool encapsulates a knowledge about common signing issues and can detect and resolve most of them.
Fastlane is installed as Ruby gem:
gem install fastlane
And then simply invoked:
fastlane sigh --development
Answer two questions, and voila:
[11:56:55]: No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you
[11:57:01]: Creating new provisioning profile for 'com.myapp' with name 'com.myapp Development'
[11:57:06]: Downloading provisioning profile...
[11:57:09]: Successfully downloaded provisioning profile...
[11:57:09]: Installing provisioning profile...
Finally, go to Build Settings -> Signing, and switch to newly created provisioning profile, whose name you just saw in the command output.
This example is for development code signing problem (running on the device). Check sigh documentation for all other options.

In my case, in keychain i had two certificates with same name, i removed one of the certificate which is duplicate then it solved the problem.

I had remaining private keys from certificates I had revoked, certificates were gone but not the private keys. Deleting them solved the problem.
To find them:
Open Keychain access
Click "Keys" under category on the side left menu
Look for iOS Developer: ..." keys that do not have a certificate tied to them
I deleted them and problem went away
The highlighted key in the picture is a sample private key without a certificate.

"Enable automatic signing" and then selecting a team from the drop-down menu helped me with this exact problem.

Because I haven't seen this specific answer:
My issue was I needed manual signing. So my mistake was that In Build Settings -> Code Signing -> Code Signing Identity
I had my debug (Automatic signing style, and Apple Development Certificate), Staging and Release (Manual and Apple Distribution (adHoc) variants set correctly.
What I DIDNT have set correctly (due to some flawed logic in my understanding) was the "ANY IOS SDK" value. Once I set it to the same manual Apple Distribution cert, the error went away.
Initially i had it set to an Automatic value "iOS Distribution" because I figured it would better handled automatically since I didnt know what it meant. still dont. oh well hope it helps

Delete the developer certificate that does not have a private key.
Delete the provisioning profile from your machine using go to folder (~/Library/MobileDevice/Provisioning Profiles)
Then first check then uncheck the Automatically manage signing option in the project settings with selecting team.
Sing in Apple developer account and edit the provisioning profile selecting all available developer certificates then download and add to XCODE.
Select the provisioning profile and code signing identity in project build settings

Xcode 11
This is the error I got
Provisioning profile "XXX" doesn't include signing certificate "Apple Development: XXX (XXX)".```
Now Xcode 11 automatically created a certificate "Apple Development: XXX" which is valid for all platforms
You just need to
Go to https://developer.apple.com
Go to your provisioning profile
Check if this certificate is selected

The issue seems to start happening in Xcode 11.
Go to Apple Developer
Find the right provision profile
Press Edit in the right upper corner
Choose the (Distribution) option in Certificates. (I think it's a new option/certificate type that apple introduced though I couldn't find any documentation)
Optional: Delete all you provision profiles in (~/Library/MobileDevice/Provisioning Profiles/)
go to Xcode ->Preferences->Accounts->Download Manual Profiles

I have the same problem.
I changed the mac. And when I downloaded the Xcode certificate, I received an error message: "The error is that the security profile does not include the certificate signature."
1) Go to https://developer.apple.com/account/ios/profile/limited/edit
Select the project => edit => Certificates => Select All => Create => Download
2) In Xcode: Project file => Signing (Debug) => Provisioning profile => Import profile => Select file with 1

For me, None of the above solutions worked. I was migrating from two older mac's to a new mac, trying to get release/debug profiles working on Xcode WITHOUT Xcode auto managing them.
The solution for me was that when I went and created the two new Certificates, i ALSO had to go into my provisioning profiles, and add (under both the distribution and dev) the new certificates to the provisioning profiles so recognized them. After doing this & downloading, xcode removed all errors and it is good to go.
Hope this helps someone!

I got one of these emails from Apple:
Dear John Doe,
The following certificate has either been revoked by a member of your
development team or has expired:
Certificate: iOS Development
Team Name: Honey Team, LLC
This does not affect apps that you've submitted to the App Store or
your ability to update your apps. If you're using provisioning
profiles that contain this certificate, they must be recreated before
they can be reused. For details, see the "App signing overview"
section of Xcode Help.
Best regards,
Apple Developer Program Support
I created a new certificate which revoked the previous certificate (locally and on any other developer's mac). For it to work I must download the new provision profiles.
The solution is to:
login into Apple developer account
remove/revoke the previous certificates created in my name.
add the new certificate to the provision profile. You can identify the newer one by their expiry date
download them again from Xcode. Xcode >> Account >> Download All Profiles
restart Xcode
I personally didn't have such access. This access was only available to our team's admin, hence I don't have screenshots nor certain if these steps are 100% correct.

I haven't seen this mentioned yet but if you are still having issues after recreating your provisioning profiles, deleting the existing ones you have in your Provision Profiles folder, checking for dupes in your Keychain, etc (all other answers ITT), open your Target > Build Settings > Code Signing and make sure everything looks consistent in there. For example, I had changed the Code Signing Identify for Debug to a Distribution identity, which obviously wouldn't work as the Development Provisioning Profile doesn't have the Distribution certificate and was causing the error in the first place.

If your trying to upload your app to iTunes Connect (your Provisioning Profiles are set to Distribution), Go to Project Settings -> Build Settings -> Code Signing. Make sure to set all of Debug and Release Options to your Distribution Provisioning Provisioning Profile.

This might help you
iOS Distribution profile
Scenario:
Another developer gave me a certificate.
I installed this simply
Error :
Xcode 8 shows error that provisioning profile doesn't include signing certificate
Which was not exactly correct error.
The error was the private key missing
Preference -> Accounts -> Double click team
Call the developer to send the private key.
and installed it into your locally
SECOND SOLUTION
Create a fresh certificate.
Edit your existing provisioning profile
Include fresh certificate
Save and download

It means you need to do either 1 of the below:
You should have created a certificate at the Developer Center and then included that Certificate within the Provisioning Profile which you will Import into XCode.
Else, If you are using a certificate created by someone else, then get them to share/export their certificate & private key (.p12 file) to you & you need to include this into your keychain. Refer here
A solution to #2 when you are not able to get the certificate & .p12 file from the creator would be to just check the 'Automatically manage signing' option.

Here are the steps solved for me (For those who face the same problem in XCode 9.2):
Just manually deleted local profiles in ~/Library/MobileDevice/Provisioning Profiles.
Deleted and created all the certificates and provisioning profile from developers account.
Removed developers account from Xcode and re-added it.
Solved my problem! :-)

This happens because the provisioning profile can't find the file for the certificate it is linked to.
To fix:
Check which certificate is linked to your provisioning profile by
clicking edit on your provisioning profile in the Certificates, Identifiers & Profiles section of the Apple Developer dashboard
Download the certificate from the dashboard
Double click the file to install it in your keychain
Drag the file into Xcode to be extra sure it is linked
The error should be gone now.

Clicking but then cancelling "Enable Automatic Signing" worked for me, although the actual change it made was:
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
or in Xcode it's called Always Embed Swift Standard Libraries

I had the same issue and reason was penny. Wrong profile and certificate was selected in build settings. I only had did this before few days. So, you do not need to enable "automatic" inside xcode. Check profiles inside your build settings before doing it.

Try downloading the certificates/profiles directly from the member centre rather than doing it from Xcode.
It worked for me when I manually downloaded them from the member centre.

Related

No matching provisioning profile found error [duplicate]

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?
I also had some problems after updating Xcode.
I fixed it by opening Xcode Preferences (⌘+,), going to Accounts → View 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.
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.
Keep quitting Xcode until the damn thing works.
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.
Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and add it to Keychain access > certificates (which expires on 2023)
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 :)
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.
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.
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.
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.
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.
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
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.
Now go to xcode app. target → Build Setting → Provisioning Profile . Select value from 'automatic' to appropriate Provisioning profile . Bingo!!! profile mismatch issue is solved.
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.
I updated to Xcode v7.3.1 and it solved the issue.
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.
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.
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...
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.
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
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.
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!
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!
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.
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.
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.
For everyone who didn't solve it yet, my Issue was answered by this:
https://stackoverflow.com/a/41202884/3953197
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.
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.

Xcode 7.2 no matching provisioning profiles found

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?
I also had some problems after updating Xcode.
I fixed it by opening Xcode Preferences (⌘+,), going to Accounts → View 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.
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.
Keep quitting Xcode until the damn thing works.
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.
Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and add it to Keychain access > certificates (which expires on 2023)
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 :)
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.
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.
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.
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.
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.
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
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.
Now go to xcode app. target → Build Setting → Provisioning Profile . Select value from 'automatic' to appropriate Provisioning profile . Bingo!!! profile mismatch issue is solved.
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.
I updated to Xcode v7.3.1 and it solved the issue.
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.
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.
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...
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.
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
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.
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!
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!
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.
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.
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.
For everyone who didn't solve it yet, my Issue was answered by this:
https://stackoverflow.com/a/41202884/3953197
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.
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.

Xcode6:Embedded binary is not signed with the same certificate as the parent app

After I add Today App Extension Target,I become impossible to compile project.
below is error:
error: Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's.
Embedded Binary Signing Certificate: iPhone Developer: (Developer name) (number)
Parent App Signing Certificate: iPhone Developer: (Developer name) (number)
but Embedded binary certificate and parent app's cerificate are the same.
So I'm confusing now...
I had to select my app under 'Targets', then go to the 'Capabilities' tab and click 'Fix Issues' under the 'App Groups' section
I had discrepancies under Code Signing. My Extension and Main app had different certificates selected. Once I set both to use distribution it worked fine.
In the case of using WatchKit, make sure that your Watch App has the correct "Team" selected in the Watch App Target settings (under General > Signing > Team). I had set the phone app's team, but not the watch app's team.
If your Xcode has been working fine but stopped working after you add an extension target to your project, most of the time is that your app was signed using a older certificate (still valid with your name etc.), while your extension is signed with a newer certificate with entitlement for the extension. This is why the error. In this case, you most likely have two certificates with the same name, and this what you can do:
1.Go to Xcode->Preference;
2. Select Accounts Tab;
3. Select your Apple ID then click on View Details;
4. Under signing Identities List Window, select IOS Development, then click on the
little Configuration icon, and select Revoke;
5. Xcode will then try to download a new certificate.
You can do a clean build after this so both your app and extension will be signed using the new certificate.
I solved it by deleting my Apple ID account in
Preferences -> Accounts
and then logging back in again with my Apple ID
I had the same issue in Xcode 6, but in my case it occured because of having two active developer certificates. Revoking one had fixed the issue.
This issue might arise in the case where the embedded app targets like extensions or watchapp does not have the matching team selected in the General section, as the main iOS app.
Selecting the right team for all relevant targets fixed the issue for me.
I had a similar issue. For me the issue was with the certificate showing, 'signed by unknown authority'. I had followed the below steps and it is resolved.
The problem was missing apple WWDR intermediate certificate.
We must also install the WWDR intermediate certificate issued by Apple’s worldwide developer relations. It can be downloaded from the portal or directly at http://developer.apple.com/certificationauthority/AppleWWDRCA.cer Make sure you add this to your keychain as well.
To add the certificate: open your keychain utility software on your Mac computer, then go to File→Import items, then select AppleWWDRCA.cer.
There are quite a few reasons the issue may emanate from. If none of the other answers are working for you - would like to add another plausible check that helped me. Ensure the certificate you are signing with doesn't have 'Always Trust' (you will see a green '+' sign if the setting is such).
Go to Key Chain access, double click on the certificate you are using.
Expand the 'Trust' drop down and change/set to 'Use System Defaults' from 'Always Trust'.
It's especially true if you are using Swift in your project as the 'Always Trust' setting breaks pertinent Swift libraries.
I tried to run project in iPhone5,but App Extension does'nt support 32-bit architecture.So When I build project in iPhone5S,I can build the project !
You need to create Provisioning Profile for that target and make sure to include the same certificate in it.
Targets has their own bundle id se you will need to create an AppId also.
This solved the same problem that you are having
best
Just let Xcode handle the provisioning work. This solved the same issue in my case. http://aplus.rs/2014/embedded-binary-is-not-signed-with-the-same-certificate-as-the-parent-app/
In case this helps anyone, my fix was that I had updated my archive scheme for release when submitting to the store, but never changed it back to adhoc for testing. Editing my archive scheme to use ad hoc worked.
When I had this issue I went to the Apple Member Center and realized that the Provisioning Profile (for the extension) that I had created was marked as 'Invalid'. I just re-created the Provisioning Profile with the same certificate that the app is signed with and then downloaded it via Xcode > Preferences > Account > refresh.
Once I had the new provisioning profiles I selected them in the build settings. I selected the provisioning profile that was just created and also selected the corresponding certificate in the Code signing entity in the build settings and that fixed the issue.
Note that the extension has its own app id and hence its own provisioning profile.
For Xcode 8 beta 3
My build numbers were off on my different Targets in my Xcode project file.
My iOS target had a build version 3, but my watch app target and my share extension target both had build version 1.
All I did was match all the targets' build numbers (changed them all to 3) and it fixed the issue.
Hope this helps.
Refreshing my provisioning profiles fixed it for me (Preferences -> Accounts -> Double tap the account -> tap refresh button in lower left)
Open your key chain and It's the Apple Worldwide Developer Relations Certification Authority, if I choose always trust, Xcode archives failed. When I changed to system defaults, Xcode archives successfully. Yes you will enjoy!!
For some reason, my developer certificate was stored in my keychain twice. Deleting one of them fixed the issue.
I had got the same issue.
So I did a provisioning profil for each bundle ID and configuration of the WatchKit App :
Watch App Development
Watch Extension Development
Watch App Production
Watch Extension Prod
/!\ Be careful because the app ID of the watch app in the developer portal is something like :
com.example.projectname.watchkitapp.watchkitextension
and when i created the watchkit app the bundle ID in Xcode was :
com.example.projectname.watchkitapp
maybe it something which changed since WatchOS 2.0.
I had to go to:
Xcode-> preferences -> Accounts -> View Details -> select all Provisioning Profiles -> press DEL-key on keyboard after deletion is completed press Download All button!
I had the same issue with an app in Xcode 7.1. The app had a Watch extension and therefore an App Group. What worked for me was to:
Go to ~/Library/MobileDevice/Provisioning Profiles
Delete all provisioning profiles listed there
Go to the iOS Dev Center in Safari and regenerate all provisioning profiles
Go back to Xcode => Preferences => Apple IDs and choose the Apple ID associated with the app
Click "View Details..." (lower right)
Download the provisioning profiles that were just created
Clean and build again
I believe my provisioning profiles got mixed up because I was using Xcode's "fix automatically" feature for another issue I had with Capabilities => Associated Domains.
Open KeyChain Access on your mac, delete the other one certificate that is diff from your own certificate.This issue was general appeared after you loged in another account in your Xcode.
I faced the same issue too, I solved it by the procedure as follows:
First, I re Create my team develop certificate(Because we renewed our root certificate)
2、 edit the Iphone Apps develop certificate ,be sure include your certificate you just create.
3、doing same to the watchkit extension And watch kit App
4、go to Your Xocde "Preference ", double click your "Team Name",delete the old Certificate of Iphone 、watchApps、 watchExtention
5、download your new certificate and install.
Then it works.
In my case my App and my Widget profile were signed with different certificate.
So I had to go to to iOS Developer site, select parent app provisioning profile->Edit and choose the same certificate as the widget.
Then click "generate" and "download". Onece you have download it, double click on it to install in XCode.
Then select the new provisioning profile for your parent app in Build Settings->Provisionig Profile.
Finally Rebuild your project!
For me this was happening because some of my provisioning profiles were expired. Created new profiles on developer.apple.com, removed the old ones, set them to Automatic in Xcode, and the error went away.
In my case the profile my extension target uses contains different certificates than the profile the parent target uses contains. This was exactly the error messages complained about!
The reason was I generated a new certificate for the extension profile.
So log in to developer.apple.com to see if these profiles contains different certificate.
After a whole day it turns out "Apple Worldwide Developer Relations Certification Authority" in the Root Certs had been deleted. I export one from another machine and installed, everything works fine.
If you are using any extension (in my case I was using OneSignal Extension) in that case your parent app bundle will be com.app.xyz but for extension/widget your bundle id would be com.app.xyz.extension
So we will create an app id with the bundle identifier com.app.xyz.extension and we will create provisioning profiles for this app id.
We would use same development and production certificates which we used for parent app.
Here is link which can be helpful provisioning profile for a widget
Finally I am not using automatic settings. So I set my provisioning profiles and certificates manually
Check All targets select one by one and click signing & capabilities -> Select team
Then go for
Build settings->Signing Set all as per provisioning profile
Then
//:configuration = Debug
PROVISIONING_PROFILE =
//:configuration = Release
PROVISIONING_PROFILE =
//:completeSettings = some
PROVISIONING_PROFILE

After Provisioning profiles are made, code signing not found

Here are the steps I have taken to get where I am now:
Created two certificates in the developer center for APNs development and production (both tied to the App ID I am using with push notifications enabled)
Downloaded and installed the certificates into Keychain Access.
Created provisioning profiles in developer center for production and development (both pointing to the appropriate App ID)
In XCode, under Preferences > Accounts > View Details - I refresh and get the provisioning profiles. It lists two signing identities (development and distribution but not sure if these are correct).
Under Build Settings I have the appropriate provisioning profile selected but...
There are NO code signing identities available, except "iPhone Developer"
So my question is, how can I get the right code signing identities listed here so I may publish my app? The app currently working fine in the app store, but I want to switch from a Phonegap build (what I currently have published) to an Xcode build.
Any help is GREATLY APPRECIATED! Thanks!
It sounds like you are doing everything correct until you hit step 5. Since provisioning profile are under signing identities, my guess is that since you choose the provisioning profile first it's messing something up.
Try resetting your Provisioning Profile to "None". Then select your Code Signing Identity.
Under Target -> General Are you selecting the correct "Team"? Without the correct team, your code signing will not be found.
Please make sure that the Code Signing Identifier under the Build settings for both the Project and Target MUST be the same.
If still can not work, then I think you can clean up the project, close down your XCode project and then reopen. Sometimes it solves the problem this way.

Certificates won't show in code signing identity in build settings

I'm encountering the errors:
No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found.
and:
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'
XCode isn't giving me any option other than "Automatic iOS Developer and Distribution" options in the 'Code Signing' area of the 'Build Settings'.
I've tried changing the bundle id to match the certificates exactly, as well as a more generic com.domain.appname ID, I've deleted and recreated the provisioning profiles - I'm really lost, it feels like it should be something really simply but I can't get my certificates to show in the settings.
I was shocked when having the same problem and reading some answers here, too complicated. But I solved this much much simpler.
Open Keychain Access. Delete iPhone Developer and iPhone Distribution certificates, although they are still valid.
Open Apple Developer Centre. Download iOS Development and iOS Distribution certificates again. Yes, I download them again as they are written as XXXX-1.cer
Drag them to Keychain Access to reimport them.
Rerun XCode. Problem solved.
The first thing I would check is that your Cert in Keychain Access is present and is married up to your private key. If it's listed but your private key isn't paired with it you've likely changed your Mac's password recently and instead of pressing "Update Keychain" you may have clicked on "New Keychain". This will require performing the CSR process again and adding that new cert from the portal to the existing prov profiles. (A screenshot here may help).
Next I would make sure that XCode's Organizer is showing your provisioning profiles as valid with a green checkmark. If they aren't valid XCode will tell you why. This could be anything from the missing private key to your cert wasn't added to the profile in the dev portal. (Another screenshot here may help).
If all of that looks good restart XCode. I've had problems with XCode not properly importing prov profiles until I give it a swift kick in the pants via restart.
What worked for me was to create a new iOS Provisioning Profile in apple portal then download and add it to the Organizer in XCode , my scenario was that I was importing the project from another user account and when Titanium was compiling the project had the iOS Provisioning Profile associated from the other user account therefore was crashing, so when I was ready to compile in the Run on iOS Device dialog I changed the Provisioning profile to the new one.
As it has been stated before, you need to see the green button (valid profile) in the Provisioning Profiles for your device .
Good luck! it took me two days to fix this!
Ren#ud

Resources