问题
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.
回答1:
I had the same problem and basically did like posted in the comment:
- Remove my account at Xcode / Preferences at the top right.
- open keychain. At the left "my certificates": Delete the Mac or iPhone etc Developer certificate.
- just starting Xcode again and creating a new account like one did when starting Xcode for the first time.
回答2:
- Change your trust settings of your developer certificate in keychain access to system default
- Delete all certificates in your local keychain
- Quit and relaunch xcode
- Clean
- Run program on device
- When it asks, enter your keychain password and click always trust
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.
回答3:
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.
回答4:
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.
回答5:
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.
回答6:
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.
Cert popup
来源:https://stackoverflow.com/questions/47307416/xcode-ios-app-development-code-signing