"No iOS Distribution certificate was found" - ios

XCode has started generating this message when I try to refresh the profiles:
"No iOS Distribution Certificate Found. No iOS Distribution certificate was found. However, there is already a certificate request pending. An Agent or Admin must approve this request before you can download your certificate".
However there are no certificates pending approval displayed on the provisioning portal. What's more, I myself am an agent so even if there were a certificate pending approval I would be able to approve it.
What's the best way of getting Xcode / the portal out of this state?
At the moment I can't even compile because of this. Shouldn't I at least be able to develop even if there is no distribution profile?

Did you happen to recently change your keychain password and maybe blow away the keychain that the CSR was signed with? It will show up as the same keychain name but will be signed differently. I only ask since I accidentally did the same not too long ago.
EDIT:
If you don't see your keychain with a private key associated with it like the bottom two certs below you've got a keychain issue on your development box. The top cert is someone else from my team who I obviously don't have their private key.

Related

Xcode 7 error: "Missing iOS Distribution signing identity for ..."

I tried to upload my App to iTunes Connect resp. AppStore and got the following error:
Failed to locate or generate matching signing assets
Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues.
Missing iOS Distribution signing identity for ...
Xcode can request one for you.
Before I set up a new development machine, exported the developer accounts via Xcode 7 from the old to the new machine.
What can I do to fix this?
From Apple -
Thanks for bringing this to the attention of the community and
apologies for the issues you’ve been having. This issue stems from
having a copy of the expired WWDR Intermediate certificate in both
your System and Login keychains. To resolve the issue, you should
first download and install the new WWDR intermediate certificate (by
double-clicking on the file). Next, in the Keychain Access
application, select the System keychain. Make sure to select “Show
Expired Certificates” in the View menu and then delete the expired
version of the Apple Worldwide Developer Relations Certificate
Authority Intermediate certificate (expired on February 14, 2016).
Your certificates should now appear as valid in Keychain Access and be
available to Xcode for submissions to the App Store.
As noted in a comment below, the expired certificate also needs to be removed from the login section, as well:
To all that cannot get it working despite the instructions... There
are two expired WWDR certs. One is in login keychain, and the other
one is in the System. You have to delete both of them in order to make
things working
I also faced the same issue today. The following steps fixed my issue.
Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
Double-click to install to Keychain.
Then in Keychain, Select View -> "Show Expired Certificates" in Keychain app.
It will list all the expired certifcates.
Delete "Apple Worldwide Developer Relations Certificate Authority certificates" from "login" tab
And also delete it from "System" tab.
Now you are ready go.
I kept running into the issue and saw that all my certs were invalidated -- oh no!
It turns out I never deleted the expired cert. It was not showing up for me, until I selected from Keychain Access application:
View->Show Expired Certificates
then
System->All Items
will finally display that gnarly expired cert. Delete that and retry from XCode will pick up the new valid certs.
Just make sure you search "All Items" in the Keychain Access app. The invalidated certs are a result of pointing to the expired certificate that has not been deleted yet.
The below process will solve the problem,
1: Open KeyChain access, and Delete "Apple world wide Developer relations certification authority" (Which expires on 14th Feb 2016) from both "Login" and "System" sections. If you can't find it, use “Show Expired Certificates” in the 'View' menu.
2: Now download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and double click the certificate to add it to Keychain access > certificates (which expires on 8th Feb 2023).
Now the valid status of the certificates should turn green like below.
Once check the status.
Apple has made following changes so download new certificate developer.apple.com
renewed certificate and place it as below screen shots .In the keychain as below screen shots click on system and then certificate. Delete the expired certificate . Then drag and drop the AppleWWDRCA.cer that you downloaded from above link
Apple Worldwide Developer Relations Intermediate Certificate Expiration
To help protect customers and developers, we require that all third
party apps, passes for Apple Wallet, Safari Extensions, Safari Push
Notifications, and App Store purchase receipts are signed by a trusted
certificate authority. The Apple Worldwide Developer Relations
Certificate Authority issues the certificates you use to sign your
software for Apple devices, allowing our systems to confirm that your
software is delivered to users as intended and has not been modified.
The Apple Worldwide Developer Relations Certification Intermediate
Certificate expires soon and we've issued a renewed certificate that
must be included when signing all new Apple Wallet Passes, push
packages for Safari Push Notifications, and Safari Extensions starting
February 14, 2016.
While most developers and users will not be affected by the
certificate change, we recommend that all developers download and
install the renewed certificate on their development systems and
servers as a best practice. All apps will remain available on the App
Store for iOS, Mac, and Apple TV.
Since different methods can be used for validating receipts and
delivering remote notifications, we recommend that you test your
services to ensure no implementation-specific issues exist. Your apps
may experience receipt verification failure if the receipt checking
code makes incorrect assumptions about the certificate. Make sure that
your code adheres to the Receipt Validation Programming Guide and
resolve all receipt validation issues before February 14, 2016.
After searching for a while I found out that it is not sufficient to export the developer accounts from Xcode and import these on the new machine, again via Xcode.
Additionally I needed to copy the Certficate named "Apple World Wide Developer Relations Certificate Authority" from the keychain of the former development machine to the keychain of the new one.
This solved the problem for me.
I imported the new Apple WWDR Certificate that expires in 2023, but I was still getting problems and my developer certificates were showing the invalid issuer error.
In keychain access, go to View -> Show Expired Certificates, then in your login keychain highlight the expired WWDR Certificate and delete it.
I also had the same expired certificate in my System keychain, so I deleted it from there too.(Important)
After deleting the expired cert from the login and System keychains, I was able to build for Distribution again.
I removed old AppleWWDRCA, downloaded and installed AppleWWDRCA, but problem remained. I also, checked my distribution and development certificates from Keychain Access, and see below error;
"This certificate has an invalid issuer."
Then,
I revoked both development and distribution certificates on member center.
Re-created CSR file and add development and distribution certificates from zero, downloaded them, and installed.
This fixed certificate problem.
Since old certificates revoked, existing provisioning profiles become invalid. To fix this;
On member center, opened provisioning profiles.
Opened profile detail by clicking "Edit", checked certificate from the list, and clicked "Generate" button.
Downloaded and installed both development and distribution profiles.
I hope this helps.
My answer was different and came along with the message:
resource fork, Finder information, or similar detritus not allowed
The solution was to do with generated graphics:
Code Sign Error in macOS Sierra Xcode 8 : resource fork, Finder information, or similar detritus not allowed
Don't forget to also install the iOS cert for your Apple Developer Account.
Make Sure that in Project Navigator > Signing > Team , A team name must need be selected.

Xcode 6 App Store submission fails with "Your account already has a valid iOS distribution certificate"

I'm using the latest XCode (6.1) and I need to submit the app as soon as possible, but I can't seem to get around the "Your account already has a valid iOS distribution certificate" error.
I have the client's provisioning profile and I have his distribution certificate (which is valid) and his private key (I've checked using Keychain, it's definitely there). The bundle ID is also correct. I've deleted my provisioning profiles and certificates and reinstalled the client's many times now.
What could be causing this issue? I've seen a lot of topics here on SO with this problem, so I apologise beforehand for creating yet another clone, but I really don't know how to fix this.
edit: I'm running a brand new install of Yosemite by the way
Got it solved by editing the iOS Distribution Provision Profile in the Developer Member Center.
For some reason there were 2 certificates to choose from for the Distribution Provisioning Profile. I switched over to the other certificate and I could Validate and Submit my Archive build for beta testing.
So, you may have more than one certificate for signing your Provision profiles. Make sure you have the right one (by trying all of them) and hopefully that should work.
I tried many things like Exporting Developer profile from Xcode Accounts and importing it in the organizer, installing the provision profiles from the member center, adding them to my keychain. But none of those worked. It started working only after editing the appropriate Provisioning Profile manually.
You could also trying removing all your available Provisioning Profiles and let Xcode create new ones for you. This will work too.
I also had this issue, which turned out to be caused by an attempt to export for ad hoc deployment using a development provisioning profile instead of a distribution profile. It seems this is no longer supported in Xcode 6.1. Once I created an ad hoc profile and installed that the problem went away. A more useful error message would have saved me hours of work and would be greatly appreciated, Apple.
This thread was helpful:
xcode 6 beta 2 issue with exporting ipa "Your account already has a valid iOS distribution certificate"
Besides all the other answers, there's one more possibility after 2/15/2016: the old World Wide certificate expired and I guess everyone has already downloaded the new cert (or check this out). However, you'll be seeing this error if you haven't remove the expired one. You may need to choose View -> Show Expired Certificates to unhide expired certs. If the error is still there, try regenerate provisioning profile as advised by the others.
I was moving to new Mac when I faced this issue.
On your older Mac:
Go Preferences > Accounts > Select Account > Details.
In the dropdown right click on iOS Distribution (or whatever is the name of your distribution certificate).
Export...
Set a password for the .p12 file.
Move and install this .p12 in the new mac.
Try Again.
Another possible cause for the problem (at least in my case) was that in my Keychain Access, I had two certificates for the team I was working with. One was expired, and the other one was the one I wanted to use. Deleting the expired certificate in Keychain Access solved the issue.
I ran into this problem, and I wanted to avoid screwing up my push notifications.
The easy fix for me was to just go to developer.apple.com > project > certifications, ids, and profiles > profiles > create a new profile (for development or distribution)
Download the created profile, drag and drop the profile over the Xcode icon, and then in your project target, set the new profile as the provisioning profile.
This fixed my problem--it may provide further help in the future.
The error message could mean that you need to get the Distribution certificate and private key from the developer who created them.
This can happen if some other team member has pressed the enticing "Reset" button (which means revoke certificate and create a new one).
Here is a picture what the revoked certificate looks like:
You can export the valid certificate from the developer who created
it and import it to other team members keychains.
Go to "Keychain Access" app.
Click on the "Login" in the top left box
Click on the "Certificates" on the bottom left box
Check which team member has the valid certificate:
when clicking on the "iPhone Distribution" certificate
everyone else sees "This certificate is revoked" in red at the top.
(Maybe backup the deleted certificate to avoid doing anything irreversible)
delete the revoked certificates
Export the one valid certificate and distribute to team
Import the certificate file for everyone else
Today I was solve problem by delete from keychain old certificate Apple Worldwide Developer Relations Certification Authority and install new one (exp. in 2023)
I'll add to here because while the accepted answer got me on the right track it wasn't the solution. There was a second (automatically created by Xcode) distro cert which I revoked. After doing that a new error came up. ("An App ID with Identifier '' is not available"... it also wasn't helpful) Eventually this lead me to the fact that my App Id in the member portal didn't have entitlements matching the build.
I solved this issue by editing the provisioning profile in the member center which is used in my app and re-install the provisioning profile.
I recently changed computer.
The reason for me was that I had several developer certificates in the Apple Developer member portal.
The solution was :
Go to Apple Developer Portal
Go Under Certificates -> Production
Click on "Revoke" for the oldest certificates and keep the most recent one
Revoking certificates won´t affect your Apple Store apps :).
I had this happen to me when I accidentally reset the certificate on another mac. Here's my scenario.
Mac1 - Had working certificate.
Mac2 - I accidentally reset the iOS distribution certificate
Mac1 stopped working and I get the message "Your account already has a valid distribution certificate"
The fix was
On Mac2, Keychain access -> certificates -> iOS Distribution certificate (for you/your company) -> export to p12 file (it will ask you to set a password)
Copy the exported file to Mac1
On Mac1, Keychain access -> certificates -> iOS Distribution certificate (for you/your company) -> delete (this is the old one that does not work)
On Mac1, double click the p12 file (then enter your password).
You should see a new iOS distribution certificate (for you/your company) in the certificate section of Keychain access.
This fixed the issue for me on Mac1.
Got it solved by deleting the provisioning profile which is managed by Xcode
(XC iOS Ad Hoc: *) from the member center

No iOS Distribution certificate was found

I keep getting this message when I refresh under Xcode organizer when it is "Checking for pending CSR..."
No iOS Distribution Certificate Found
No iOS Distribution certificate was found. However, there is already a
certificate request pending. An Agent or Admin must approve this request
before you can download your certificate.
I'm using Xcode 4.6.1. There are no certificates in the portal and no pending ones.
Thanks!
You might need to download the certificate from the portal and add it to your keychain. If there are no certificates in the portal, then you'll need to create one and upload it. Follow the instructions in the portal for this.
Well the message says it all. The cert that you requested is pending for approval. You can wait until it gets approved and download it or let xcode sync it. Option two revoke that and create another one in case the one pending does get hanging for too long.

Xcode valid signing identity not found, managing 2 dev accounts

I have a business account/profile that I used for app1. I put out app1 on the market and it is currently online. I then started a personal app2 with another dev account and finished app2 and tried to put it on the market. I got an error that I can only have one distribution certificate in the keychain so I removed my business one and was able to submit my personal app2. So now I am trying to make some changes on app1 but now I am getting a "valid signing identity not found" warning. So I tried re-downloading my distribution certificate and whatnot, tried creating new profiles, nothing is working. In the keychain I can view the certificate and there is no private key associated with it. I've read about everyone else who has encountered the "valid signing identity not found" problem and it seems the common solution is to revoke the certificate and create a new one. Except that I read that if you revoke the current certificate then my app will stop working on all devices & I can't have that happening. Please tell me apple didn't just screw me over (again).
I found this link, which answers the question: What, if any "screw it up permanently" situations are there in the App Store certificate/key-pair code signing process?
A Distribution certificate is used only for submission to iTunes Connect (and Ad Hoc stuff). Once approved, Apple signs the app with a different non-expiring certificate before putting the app in the App store, so the state of the developer's Distribution certificate no longer matters.

Problems getting a development certificate for iOS 5 [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
iOS Developer Program - can't get a certificate
So I am trying to develop an iDevice application, and I can't seem to get a development certificate. I am running XCode 4.3.1 and Mac OS X 10.7.3 and iOS 5.1.
First, I've tried going to the iOS Provisioning Portal and using the "Development Provisioning Assistant." When I go through that (using both Chrome and Safari), when I upload the CSR (generated by going to Keychain Access => Certificate Assistant => Request a Certificate from a Certificate Authority and then enter my Apple ID email, name), it hangs with "We were unable to generate your Provisioning Profile. Please try again or visit the Provisioning section of the Provisioning Portal."
So, then I figured I'd try going to the iOS Provisioning Portal > Certificates > Development. I download the WWDR intermediate certificate and double click on it, which I think "installs" it. At least, it appears in my Keychain as "Apple Worldwide Developer Relations Certification Authority" Then I hit "Request Certificate" (and note that it directs me with "Important: Xcode is the preferred method for requesting and automatically installing this certificate. Before proceeding, read Tools Workflow Guide for iOS." -- this will be important later). I follow the directions, creating a CSR, which I then upload on that page. When I hit "Submit" I'm brought back to my Current Development Certificates, which excitingly, now reads "Pending Issuance." Lots of places on the rest of the internet say to just refresh the page and supposedly I should be done. Except when I refresh, it just says I don't have any valid development certificates and presents me with the first view, from which I can request a certificate.
So, what about that link to the iOS Application Development Workflows? When you check that out and start to read through it, it says that "If you are a team administrator or the team agent, provision your device for generic development. Xcode installs your development certificate in your keychain (if it’s not there already), and installs the team provisioning profile on your device." I don't have a team--I'm an individual--but when I go to XCode to provision the device, I go to the Organizer > LIBRARY > Provisioning Profiles > Refresh. Then, it asks me to sign in with my Apple ID, tells me "No iOS Development Certificate Found" and offers to "Submit Request" on my behalf! Hurray? Then I see it says "Submitting CSR . . . Waiting for CSR Approval" and it hangs there for awhile. . .then it says, "Certificate Requested :: A certificate request has been submitted on your behalf, but has not yet been approved. An Agent or Admin must approve this request before you can download your certificate." That's super cool, right?
Except there's nowhere I can go to approve that request, and if I go to my Certificate History I see a long, long history of Errors. Except they're not informative at all, because it just says Error.
So at this point, I've spent ~8h trying to fix this. I've tried provisioning an iPad, iPhone, resetting my keychain, setting up XCode on a separate account, and of course updating and upgrading all the software.
Let me know if I've left anything out.

Resources