Xcode does not see my developer certificate in Code Signing Identity - ios

I renewed my IOS Developer Certificate, i deleted old ones from keychains and clicked on my certificate. Everything looks normal in keychains, i have distribution,developer, WWDC certificates in there.Every profile look valid with green marks Under Teams and Provisioning Profiles section in Organizer but in Xcode under Code Signing Identity there is no profile currently match developer profile under Automatic Profile Selector(Recommended). What can i do about it?
thanks in advance.

First of all check in Xcode -> Preferences -> Account that you have your new profile
in the list, refresh the list if it needed.
Check in Building Settings of the project that you chose your new profile's certificate as Code Signing Identity for build type that you do (release or debug).

Also check that in Xcode -> Preferences -> Account your don`t have red exclamation marks with label "Request timed out"
I had this error, and it is gone after i re-logged in using button near this mark (with entering password, etc)

Related

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

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.

No provisioning profile with a valid signing identity .No matching provisioning profiles found, xcode, ios

This message shows under identity --> Team
No provisioning profile with a valid signing identity(i.e. certificate and private key pair) matching the bundle identifier "com.myname.appname" were found.
Why is this.please help me with this.
I can test with simulator,but cannot test with my iphone.
This is how the keychain shows
I changed my mac password today
'm using a free account, not a paid one
Since release of Xcode 7, developers are allowed to test or run app on any number of devices by logging in with your Apple ID. There is no need of paid Program membership of Apple.
Follow below steps :
Add your Apple ID to Accounts preferences in Xcode.
Go to General tab in Project and choose your team name from the Team pop-up menu.
Below the Team pop-up menu, click Fix Issue.
When warning text under the Team menu disappears , Click the Run button.

make revoke certificate to valid in xcode 6.1

I am very new in iOS development. I make wrong things for my certificate in xcode and now it become revoke for my account.
My iOS Development is Revoked. and in keychain Access all certificates are gone.
What could I do to be valid again?
Log in to your Apple developer account and upload a new certificate signing request to get a valid certificate. How to do that check this link:
https://mobiforge.com/design-development/deploying-iphone-apps-real-devices
http://www.aquafadas.com/en/documentation/sample-page/developer-apple-com-2/generating-your-development-certificate/ (Old Link Dead)
1st Step (Apple developer site)
Go to this URL (Apple developer site):
https://developer.apple.com/devcenter/ios/index.action
Log in with your valid account.
On the right-hand side, there is a column with a heading "iOS
Developer Program". Select the "Provisioning Portal" section.
On the left-hand side, click the row of the column that is labeled
"Certificates"
Since I already have a certificate I'm not sure, but somewhere on
this page you should be able to click "Request certificate" or
something similar.
Wait for your new certificate, and then download and install it as
before
2nd Step (Xcode)
Revoke all current certificates and provisioning profiles
To invoke "Automatic Device Provisioning" open Xcode's "Window" menu
Organizer > Devices tab > "Provisioning Profile" sidebar under Library.
Check the "Automatic Device Provisioning" checkbox and click the
"Refresh" button. After clicking Refresh a dialog should appear
requesting your team member account credentials. It is important to
answer 'yes' when asked to create your iPhone Certificates if any are
needed. In that case, clicking "Submit
Request" will allow Xcode to create, download and install the
certificate(s).
According the 2nd step XCode is doing for you automatically below things
Prompts to create and install your "iPhone Developer" certificate
if one doesn't already exist in the iOS Portal
(for admin or agent roles) prompts to create and install your
"iPhone Distribution" certificate if one doesn't already exist in the
iOS Portal
Creates a Wildcard App ID if one does not already exist in the iOS
Portal
Creates, or updates with new devices added to the portal, your iOS
Team Provisioning Profile and installs that into your profile library
Syncs the profile library on your local machine with the profiles
on the iOS Portal
You can also refer apple link https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html

Failing to create distribution app in Xcode

I'm trying to upload my app into App Store through Xcode, I read a few sites and set the code signing to "iOS Distribution" but when I tried to Archive, an error appear "No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found."
I've created a new distribution Provisioning Profile in developer.apple.com and link it to my app and selected the distribution certificate to it. I then downloaded this profile and manage to select it in the provisioning profile section in xCode->build settings->code signing. But now I noticed that I can't select any Signing Identity with it saying "No Identities from profile "profileName"". And trying to Archive will just popout the same error as paragraph above.
If I choose "Fix Issue" when the error popup, it resets the Signing Identity to "iOS Developer" and the profile to "Automatic". The archive process runs but when I tried to validate or export an error popup; "Your account already has a valid iOS distribution certificate".
I read somewhere that this is maybe due to multiple certificates in Keychain, but I'm not sure which one to delete:
as you can see, I have a number of certs and some seems to have the same name. The 1st, 2nd, and 4th, is the name of my company (with the same id), while the 3rd and 5th, is my name (with the same id).
Now here's a weirder thing I noticed; in Certificates section of Keychain, I have 2 of the same thing (exactly same name) but their expiry date is different with the one without the key have the same expiry date as the one in the Apple Developer page.
Any idea what's going on (and how to possibly fix it)? Can it be someone (we do have other developer for other projects) actually removes the distribution certificate that I have and created another one (causing the whole thing to not sync)? If that's the case do I need to ask him to export it and send it to me? Thank you.
Case 1:
If you can use the computer that generated the certificate.
Xcode -> preferences -> Choose account -> viewDetails -> choose certificate (Distribution) -> Click setting button and export it
Copy to your computer Do same step but import this time.
Case 2:
IF you don't have the computer that generated the certificate.
You have to revoke the certificate and create a new one. (you have to be admin)
Xcode -> preferences -> Choose account -> viewDetails -> choose certificate (Distribution) -> Click setting button and Revoke it.
And Request new by clicking + button beside the setting. And use it.
OR
You can revoke it form https://developer.apple.com and regenerate.

No identities were available - administrator request

I had problems while "archiving" my app. I think there are invalid profiles because of iPhone Update to 5.1 and XCode update to 4.2.2.
I've taken now more than 4 hours to get rid of certification issues while using this thread step by step 3 times (which costs a lot of time):
Getting "A valid signing identity matching this profile could not be found in your keychain" warning
I still have the following fault:
No identities were available
An administrator must request identities before they can be downloaded.
The "Download identities" button went back to this window after processing some seconds.
Do you know how to get out of this wood of certification documentations and solve that fault?
Visit Member Center
Go to "iOS Provisioning Portal" -> "Certificates" (Left sidebar) >> "Distribution" tab
Check field "Provisioning Profiles". If empty, next (4)
Go to "Provisioning" (Left sidebar) -> "Distribution" tab. Press "New Profile" and complete it.
Go back to (3) check the field again.
Download and "run" (double click) the new provisioning profile.
In your project's build settings select the NEW provisioning profile (it might have the same name as the old one)
In your project's build settings update your code signing identities (all of them) to the new one if there is one. (The old one was probably expired which is one of the biggest causes for the error message you saw)
Verify that your bundle ID is correct (CaSe SeNsEtIvE)
Back to XCode Organizer - Devices. Click TEAM (Left sidebar) and click "Refresh" (right-bottom). You will find XCode fetch the new profile. If new content loaded, repeat steps 6 and 7 (they will have been changed!) *If you can't find team because you are running a newer version of xCode, go to Xcode preferences (clicking "Xcode" on the mac toolbar on the top left corner of your screen) and go to account, select your team and click refresh. If new content loaded, repeat steps 6 and 7 (they will have been changed!)If you are in Preferences -> Accounts and you still can't refresh, then:
Click on the Accounts tab
Select an Apple ID in the list
Click "View Details" on the bottom right
Click on the refresh arrow on the bottom left
Xcode will now refresh the updated credentials, and you can proceed to validate or distribute your app.
Validate or distribute your app again. It should work.
If this didn't work then go to "TEAM" under project settings > targets and select "none"... Now that you have selected None you will need to repeat step 7 and change the code signing identities (all of them) and try archiving again.
Lastly, if none of the above worked. Simply create a new production certificate AND create a new provisioning profile with the same bundle ID. (Yes, this will work if you are updating an app that is already live). Download the cert and prov. profile and run both (double click). Now repeat step 6 and archive. This should work.
#Takoi's answer is correct. However, with my latest version of Xcode, there is no TEAM option in the Devices section of the Organizer. I had to do the following instead to refresh the credentials:
Go to Xcode->Preferences
Click on the Accounts tab
Select an Apple ID in the list
Click "View Details" on the bottom right
Click on the refresh arrow on the bottom left
Xcode will now refresh the updated credentials, and you can proceed to validate or distribute your app.
Hope this helps!
Make sure the bundle id in your .plist file in XCode is the same as the bundle id in itunesconnect, if it's off, it won't be able to match the archive to the profile on itunesconnect when validating/distributing.
This is a little easier now.
You go to the app itunesconnect and login
click "certificates"
Provisioning Profiles / Distribution
generate a profile,
download the profile
double click it
I am a member of 2 teams and had the same problem while uploading one of the projects.
Changing General -> Identity -> Team to None in project settings (XCode 5) allowed me to upload the application to iTunesConnect.
Screenshot is here
My certificate had expired which resulted in my provisioning profile being expired.
Once I -
Updated my certificate on the iOS web portal
Clicked Edited on the provision profile
Selected the new certificate and clicked generate
In Xcode I refreshed my provisioning profiles
Error went away
I guess it is written somewhere in the stream, I did not read all in detail. I just want to emphasise on this point:
Due to an annoying xCode behavior, once you've set up everything, you HAVE TO clean the project and Quit xCode.
Then relaunch and build. Now you know if it works or not.
It looks like you're going to have to request another developer cert. Go to the iOS dev center website and go to the provisioning portal. Click the certificates tab and follow the directions. https://developer.apple.com/ios/manage/certificates/team/howto.action
To be clear, you're problem doesnt seem to be provisioning related, it's specifically the developer cert. if you do get another cert, you'll have to create all new profiles to sign your apps with.
My bundle identifier was named differently. I had to change it from Nyquist.GasBro to com.Nyquist.GasBro which is what I had in the provisioning profile.
None of previous answers helped me, so I post my issue.
Dev Center: Certificates, Identifiers & Profiles > Provisioning Profile > Distribution
Make sure that there is a distribution provisioning profile, and App ID in it is exactly the same as Bundle ID of your app in Xcode (Project Settings > General > Identity > Bundle Identifier).
Xcode: Project Settings > Build Settings > Code Signing:
Provisioning profile - choose that Distribution provisioning profile name (not Development!)
Code Signing Identity - I choosed Automatic since I have only one.
P.S. Before doing this, I deleted all unused and expired provisioning profiles and signing identities from Dev Center and from Xcode. Then, refreshed as mentioned in other answers: Xcode: Preferences > Accounts > (my Apple ID) > View Details > Refresh.
The answer that you are looking for is that when you generate the certificate request for COMMON NAME you need to put your HUMAN NAME as in John Smith, not your app name. Apple uses this term Common Name in 2 different ways and doesn't tell you that the certificate is supposed to have your name on it whereas in another area they ask for common name and want the APP name.
I had the same problem.
Nothing mentioned on this page did not work for me until i was deleted everything from archive.
After that problem disappear.
For those who says that the Ad Hoc Distribution profile wont work this year 2014, I have to agree.
In Build Settings locate the Code Signing setting: for Release choose your Store Distribution and then select Menu>Product>Archive.
Later, in the Organizer Window, select your archive and clic in Validate. It will let you select the Ad Hoc profile and validate... then select Distribute, it will let you save as .ipa file.

Resources