When I run my app into my iphone I have this Warning:
unable to build chain to self-signed root for signer "".
My application Installed in iphone but it closed suddenly.
When I run my app into my iphone I have this Warning:
unable to build chain to self-signed root for signer "".
My application Installed in iphone but it closed suddenly.
In my case,
1- Open Keychain Access
2- Select login, and click Certificates
3- Double click Apple Worldwide Developer Relations Certificate Authority
4- Open trust section, and set to "Use System Defaults" from "Always Trust"
5- Clean build folder and run
I too had the same error unable to build chain to self-signed root for signer...
My mistake was that I had changed the trust setting of my distribution / developer cert to always trust. When I changed it back to Use system Default it all worked.
I had the same problem and basically did like posted in the comment:
I saw other answers and attempted to delete my intermediate keychains and root certificate. But Apple doesn't allow to remove Root certs unless you're in recovery mode and I didn't want to try that. Likely you don't have to delete anything either as this solution works without it.
I just thought I'd add an image to clarify things. I ran into this issue when I was poking around in my Keychain and accidentally changed the default settings.
The issue could be having your certificate set to always trust, that's the issue I had. If you're getting this warning that stops you from running apps on your device, this should fix everything.
After days of trying to find a consistent way, here is the solution:
It 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 working again.
After struggling one day with many answer on forum. I came up with solution works for me. below are steps for fix:
Root Certificate Apple Inc. Root Apple Root CA - G3 Root
Intermediate Certificate Worldwide Developer Relations - G1 (Expiring 02/07/2023 21:48:47 UTC) Worldwide Developer Relations - G3 (Expiring 02/20/2030 00:00:00 UTC)
- Relaunch Keychain and go to login section of Certificate tab
- Drag drop root certificates to keychain (root certificate will be trusted automatically do not make it manually )
- Drag drop intermediate certificates to keychain
- Drag drop app specific certificate (.p12) to keychain
This issue happens due to apple has introduced new root certificate and intermediate certificate. Read more detail from https://developer.apple.com/support/wwdr-intermediate-certificate/
Download the renewed cert here: https://developer.apple.com/support/expiration/
xcode -> preferences -> accounts -> select the account -> manage certificate -> click on the + icon on the bottom left of the popup window -> ios development
THen you will see a new certificate created. Now you can run your app.
You are using Distribution certificate instead of Development Certificate if you are able to install app in debug mode but it closes automatically once installation completed.
One of the way to resolve IOS Codesigning issue is follow following Document.
iOS Code Signing Troubleshooting
And Run the following command to know the excact issue
spctl -a -t exec -vv <app-path>
One More Tip
After changing anything in system always clean & build your project to know if solution got applied successfully or not.
It is also important to note that the physical device you are trying to deploy to must be listed in the allowed devices list for that provisioning profile -> you can see this here in the tooltip that pops up from your cert information -> you want to make sure that your device is listed in the "Devices" section.
You can add / remove devices when you create the provisioning profile on the apple developer portal website.
For me, just performing Product > Clean Build Folder in Xcode was enough to fix the issue.