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

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.

Related

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

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.

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.

This certificate has an invalid issuer Apple Push Services

I have created certificate to enable Push Services in my app, but every time I try to add certificate in my Keychain, after adding certificate it shows me following error:
This certificate has an invalid issuer
I think I've figured this one out. I imported the new WWDR Certificate that expires in 2023, but I was still getting problems building and my developer certificates were still 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 certificate from the login and System keychains, I was able to build for Distribution again.
Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
and double-click to install to Keychain.
Select "View" -> "Show Expired Certificates" in Keychain app.
Confirm "Certificates" category is selected.
Remove expired Apple Worldwide Developer Relations Certificate Authority certificates from "login" tab and "System" tab.
Here's Apple's answer.
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
This is not actually a development issue. It happens due to expiration of the Apple Worldwide Developer Relations Intermediate Certificate issued by Apple Worldwide Developer Relations Certificate Authority. WWDRCA issues the certificate 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.
To resolve this issue, you have to follow the below steps:
Open Keychain Access
Go to View -> Show Expired Certificates
Go to System in Keychain
Here you find that "Apple Worldwide Developer Relations Certificate Authority" is marked as expired. So delete it. Also check under Login Tab and delete expired WWDRCA.
Download new WWDR Intermediate Certificate from here(The renewed Apple Worldwide Developer Relations Certification Intermediate Certificate will expire on February 7, 2023).
Install it by double clicking on it.
If you still face any issue with your iOS apps, Mac apps, Safari extensions, Apple Wallet and Safari push notifications, then please follow this link of expiration.
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.
Here is how we fixed this.
Step 1: Open Keychain access, 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.
Step 2: Download this and add it to Keychain access -> Certificates
(which expires on 8th Feb 2023).
Step 3: Everything should be back to normal and working now.
Reference: Apple Worldwide Developer Relations Intermediate Certificate Expiration
In Apple's Developer's portal, add a new certificate, and when asked "What type of certificate do you need?" choose "WorldWide developer relations certificate". Generate the new certificate, download and install. The moment you do that, you will no longer see the message you have described.
Edit:
The certificate can be downloaded from the following page:
https://www.apple.com/certificateauthority/
You can choose one of the following two certificates:
"WWDR Certificate (Expiring 02/07/23)"
or
"WWDR Certificate (Expiring 02/14/16)"
Follow the below steps:
Download and install from here. Double click and install it.
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.
If you don't find your WWDR certificate in Login or System tab, then select category "All items" on the left side. Most probably you will get to see an expired WWDR certificate here, and you can remove it. An expired certificate is always shown with a red asterisk.
If you are facing the "This certificate has an invalid issuer" error for all your certificates then do the following steps.
Steps:
Open Keychain and Click on Login -> All Items from the left panel.
Now, Click on View -> Show Expired Certificates from the top navigation menu.
Now search for "Apple Worldwide Developer Relations Certification Authority" and delete expired certificates.
After deleting expired certificates, visit the following URL and download the new certificate,
https://developer.apple.com/certificationauthority/AppleWWDRCA.cer.
Double click on the newly downloaded certificate, and install it in your keychain.
Double check: List expired certificates by following step number 3.
Now you have a valid "Apple Worldwide Developer Relations Certification Authority" having expiry date 2023-02-07.
Reference:
Apple Worldwide Developer Relations Intermediate Certificate Expiration
As described in the Apple Worldwide Developer Relations Intermediate Certificate Expiration:
The previous Apple Worldwide Developer Relations Certification Intermediate Certificate expired on February 14, 2016 and the renewed certificate must now be used when signing Apple Wallet Passes, push packages for Safari Push Notifications, Safari Extensions, and submissions to the App Store, Mac App Store, and App Store for Apple TV.
All developers should download and install the renewed certificate on their development systems and servers. All apps will remain available on the App Store for iOS, Mac, and Apple TV.
The new valid certificate will look like the following:
It will display (this certificate is valid) with a green mark.
So, go to your Key Chain Access. Just delete the old certificate and replace it with the new one (renewed certificate) as Apple described in the document. Mainly the problem is only with the Apple push notification service and extensions as described in the Apple document.
You can also check the listing of certificates in https://www.apple.com/certificateauthority/
Certificate Revocation List:
Now this updated certificate will expire on 2023-02-08.
If you could not see the old certificate then go to the System Keychains and from edit menu and select the option Show Expired Certificates.
Now you can see the following certificate that you have to delete:
You need to search the World from the top right search bar and delete the expired certificate. Make sure you selected Login and All items.
Just try to set local date earlier than Feb 14. Works for me! Not a complete solution but temporary solve the problem.
All my certificates are installed and expire dates are fine.
I deleted and reinstalled all my certificates, still no luck
In the end, I right-clicked on the certificate, and selected "Get Info". Under the Trust section, I selected "Always Trust" and this solved my problem.
If you got here from the Fastlane then this snippet might fix your CI deployments. Execute it before the signing.
apple_intermediate_certificate_path = "/tmp/AppleWWDRCAG3.cer"
`curl https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer --output #{apple_intermediate_certificate_path}`
other_action.import_certificate(
certificate_path: apple_intermediate_certificate_path,
keychain_name: YOUR_KEYCHAIN_NAME,
keychain_password: YOUR_KEYCHAIN_PASSWORD
)
in 2021:
Download AppleWWDRCAG3.cer (valid untill 2030) from
https://developer.apple.com/support/expiration/
Install it
If you are here from fastlane suggestion and still getting this error
after trying all above fixes
security find-identity -v -p codesigning returns valid identities found
error is happening only on build server
if you log in "manually" everything works
then this is probably due to the fact that the distribution certificate is in the wrong place:
"Login" keychain works while logged in
"System" keychain works with build server run as daemon
Check this answer with screenshot, you can just right click distribution certificate in the login keychain and paste it into system.

Xcode Archive Error: Missing IOS Distribution Signing Identity For (Name)

When I try to archive my app, I get this error...
I've been doing a lot of research, but can't seem to figure it out. I've tried everything from revoking and recreating my certificates, and recreating the Provisioning Profiles.
What do i do?
According to the Apple Developer Forums, the Apple Worldwide Developer Relations Intermediate Certificate Expiration expired 2/14/2016.
... 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.
Follow These Simple Steps:
Open Keychain from top menu go to View > Show Expired Certificates .
Now In Keychain Locate Expired Apple World Wide Developer Relation Certification Authority in Login tab and System tab from left panel and delete it from both tabs.
Download Certificate: https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and double click to install it.
Restart Xcode.
This answer solved my problem...
The problem was that the certificate was not signed by a known authority.
this certificate was signed by an unknown authority
I spent lots of time due to this certificate.After delete wwdr certificate in login and system tab problem is fixed

Resources