How to fix this Xcode Error: "Warning unable to build chain to self signed root for signer apple Development"? - ios

So, I just renewed my Apple developer membership and I started getting this error "Warning unable to build chain to self signed root for signer apple Development".
I am unable to archive my apps in order to upload them to the AppStore, I tried these threads with no luck:
https://developer.apple.com/forums/thread/86161
Always 'Ad Hoc Code Signed' for Embedded Binary Signing Certificate
https://developer.apple.com/forums/thread/662300
PS: I have "this certificate is not trusted" in my Apple development and Apple Distribution certificates in the Certificates section on the keychain access. I don't know if that is related to my issue?

What worked for me was to download the "Apple Worldwide Developer Relations Certification Authority" that expires in 20 Feb 2030 along side with the already existent one that expires in 7 Feb 2023.
That was enough to make the "this certificate is not trusted" go away, and to let me build and archive my app again.

I have this issue recently and I have found out that this is a problem with the OS.
This solution seems like a hack but it works!
Go to Xcode Preferences menu (command+,) and then Accounts tab
click on the gear icon on the bottom left and Export Apple ID and Code Signing Assets...
Set a password for the export
⚠️ You are going to delete all passwords and profiles! Don't forget your password! Writing down your password is highly recommended.
⛔️ This file will contain all your accounts and profiles. Make sure to keep it very secure.
Delete all accounts.
Build and face the new error.
Import them back using your password.
It's should working again now.

Related

unable to build chain to self-signed root for signer "iPhone Developer

I have been unsettled by this issue for the past 3 days and none of the solutions in any forum has been of any help.
Error: unable to build chain to self-signed root for signer "iPhone Developer"
I am extremely disturbed because of this issue. I really need help.
Xcode 12.4
It seems like a hack but it works!
Go to Xcode preferences and Export Apple ID and Code Signing Assets...
Set a password for the export
⚠️ You are going to delete all passwords and profiles! Don't forget your password! Writing down your password is highly recommended.
⛔️ This file will contain all your accounts and profiles. Make sure to keep it very secure.
Delete all accounts.
Build and face the new error.
Import them back using your password.
🎉 It's working again.
Remote building an iOS application from Windows failed with this error.
The following steps solved the issue:
Open Keychain Access.app.
In the left bar, go to System.
Drag the 2030 Apple certificate (that should be missing) into the window and enter your password to add it. You should now have two Apple Worldwide Developer Relations Certification Authorities in your keychain, one expiring in 2023 and the other in 2030.

Uploading archive error: "Missing iOS Distribution signing identity for ..."

I'm trying to upload my iOS app archive to iTunes Connect using Xcode, but when I click "Upload to App Store" I get the error:
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.
I'm really confused, because I had just successfully uploaded an archive for the same app about 2 hours earlier, and then I needed to make one simple fix and then needed to reupload the archive, and now I'm getting this error. I did not touch anything else.
I've done everything that I can think of to try fixing the problem, I restarted Xcode, my computer, went to Xcode preferences to click 'Download All' on the provisioning profiles, clicked "Reset" on the iOS Distribution on the same page, downloaded again the iOS distribution profile from the member center, went to the code signing settings in my app's build settings and manually set the release signing identity to the iOS distribution profile, and rearchived several times.
Update: Turns out it's due to the WWDRCA expiring today: https://developer.apple.com/support/certificates/expiration/
There are a lot of other people experiencing the same issue. I was able to temporarily bypass the issue by changing the date on my computer back 1 day.
The issue is because the Apple WWDRCA expired today (Feb 14, 2016): https://developer.apple.com/support/certificates/expiration/
Open Keychain Access, and in the menu, click View -> Show Expired Certificates. Then, delete the expired Apple Worldwide Developer Relations Certificate Authority from both the login and System Keychains. Install the renewed certificate from Apple by downloading from https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and then opening it.
Also, you might need to restart Xcode to reflect the changes. Then, clean and build your project then re-try generating your archive.
Here's statement 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.
https://forums.developer.apple.com/thread/37208
Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
and double-click to install to Keychain.
Select "View" -> "Show Expired Certificates" in Keychain app.
Delete Apple Worldwide Developer Relations Certificate Authority certificates from "login" tab and "System" tab in Keychain app.
Edited by :Jeremy Molayem Ensure the new downloaded cert is in both login and system Default to only system tab will still give error.**
Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
Double-click to install it in your Keychain.
Then from Keychain, Select View -> "Show Expired Certificates" in Keychain app.
It will list all the expired certificates.
Delete "Apple Worldwide Developer Relations Certificate Authority
certificates" from "login" tab
And also delete it from "System" tab.
Restart your Mac
Now your system is ready to upload the App
This answer below is the only one that works. Please mark it as the solution
The issue is because the Apple WWDRCA expired today (Feb 14, 2016): https://developer.apple.com/support/certificates/expiration/
Open Keychain Access, and in the menu, click View -> Show Expired Certificates. Then, delete the expired Apple Worldwide Developer Relations Certificate Authority from both the login and System Keychains. Install the renewed certificate from Apple by downloading from https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and then opening it.
I had the same problem and was able to fix it by installing this "Apple World Wide Developer Relations Certificate Authority" certificate in my keychain: link
As odd as it may seem, setting the computer's date back one day works.
I was having this exact same problem and I tried literally everything, I deleted expired certificates on keychain, downloaded the new WWDRCA as others have posted a link to. Edited and re-download my provisioning profile. and then quit xcode opened it back up and cleaned but nothing worked. The only thing that did work for me was changing the date on my Mac to Jan 1st 2016 and it uploaded perfectly! This obviously isn't a permanent fix but I'm on a deadline and it needed to get uploaded asap so hopefully this helps someone in a similar situation.
If you have renewed your account developer, go to Provisioning Profiles site and renew in developer profile.
I faced the same issue and the only thing that worked for me was setting the computer's date backwards as suggested by other responders, I tried downloading the "Apple World Wide Developer Relations Certificate Authority" but no luck.

missing ios development signing identity for (null)

when i try to generate ipa file, i am getting this error. Not able to solve.Please help me out to resolve this error:
i have own account , in my key chain access its shoeing like this :
i am not using new mac, i have already created ipa .Day before itself i have created. But today not able to do. i have .cer profile too.Its valid
Here's statement 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.
https://forums.developer.apple.com/thread/37208
Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
and double-click to install to Keychain.
Select "View" -> "Show Expired Certificates" in Keychain app.
Remove Apple Worldwide Developer Relations Certificate Authority certificates from "login" tab and "System" tab in Keychain app.
Ensure the new downloaded cert is in both login and system Default to only system tab will still give error.**
Open Keychain
Search for
Apple world wide Developer relations certification authority
Delete this.
Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and add it to Keychain access > certificates
Worked for me.
If you still have this issue even after deleting and installing the new WWDRCA, make sure you deleted it as well in you system tab certificates
I struggled with this issue for a while so wanted to post what I found in case others run into a similar issue. I ran into the above issue after revoking my certificate while trying to export my build from a friend's machine. I found the best support by going step by step through this link:
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/DistributingApplicationsOutside/DistributingApplicationsOutside.html
I would recommend following the steps in this link for anyone uploading a build to the Mac app store or exporting a Developer ID Signed Mac application.
There is a certificate called "Developer ID Certification Authority", this seems to be the one I was missing, and which caused the most trouble.
Another interesting thing to note is that the 10 digit letter/number ID for your Team/Distribution profile will be different than the ID for your developer profile. This should not throw you off, these two profiles work together.
Another good thing to know is that at the top of developer.apple.com there is a non-obvious drop down menu that lets you switch between iOS, tvOS, watchOS profiles and MacOS X profiles.
Another non-obvious UX issue when dealing with certificates is the system tab within Keychain Access. If you read that you should delete or change a property both within Login and within system, when they write system, they are referring to the system tab, which can be accessed within Key Chain access and can be seen at the bottom of this image:
This link is also helpful for certificate trouble shooting:
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/Troubleshooting/Troubleshooting.html#//apple_ref/doc/uid/TP40012582-CH5-SW11
But mainly just go through the steps in the first link given for exporting a Mac App with Developer ID Signing.
The issue is because the Apple Intermediate Certificate (Apple WWDR CA) is expired yesterday, 14 February 2016, on Saint Valentine. https://developer.apple.com/support/certificates/expiration/
1- Update the system date to 13 February 2016. (IT’S WORKING FOR ME)
or
2- Open Keychain Access, and in the menu, click View -> Show Expired Certificates. Then, delete the expired Apple Worldwide Developer Relations Certificate Authority from both the login and System Keychains. Install the renewed certificate from Apple by downloading from https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and then opening it.
or
3- Follow the steps 1 and 2; only later change the system date to the current date.

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

Resources