Xcode ios app 开发代码签名
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47307416/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode ios app development code signing
提问by Elam parithi
When I run my app into my iphone I have this Warning:
当我在我的 iphone 中运行我的应用程序时,我有这个警告:
unable to build chain to self-signed root for signer "".
My application Installed in iphone but it closed suddenly.
我的应用程序安装在 iphone 中,但它突然关闭。
回答by matphi
I too had the same error unable to build chain to self-signed root for signer...
我也有同样的错误 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.
我的错误是我已将发行版/开发者证书的信任设置更改为always trust
. 当我把它改回Use system Default
它时,一切都奏效了。
回答by Andy
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.
- 在右上角的 Xcode / Preferences 中删除我的帐户。
- 打开钥匙扣。在左侧“我的证书”:删除 Mac 或 iPhone 等开发者证书。
- 就像第一次启动 Xcode 一样,再次启动 Xcode 并创建一个新帐户。
回答by Stephen Swetonic
- 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
- 将钥匙串访问中开发人员证书的信任设置更改为系统默认值
- 删除本地钥匙串中的所有证书
- 退出并重新启动 xcode
- 干净的
- 在设备上运行程序
- 当它询问时,输入您的钥匙串密码并单击始终信任
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.
问题可能是将您的证书设置为始终信任,这就是我遇到的问题。如果您收到此警告,阻止您在设备上运行应用程序,这应该可以解决所有问题。
回答by Mahmut ?ahin
In my case,
就我而言,
1- Open Keychain Access
1- 打开钥匙串访问
2- Select login, and click Certificates
2- 选择登录,然后单击证书
3- Double click Apple Worldwide Developer Relations Certificate Authority
3- 双击 Apple Worldwide Developer Relations 证书颁发机构
4- Open trust section, and set to "Use System Defaults" from "Always Trust"
4-打开信任部分,并从“始终信任”中设置为“使用系统默认值”
5- Clean build folder and run
5-清理构建文件夹并运行
回答by Jason Perfetto
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.
您可以在 Apple 开发者门户网站上创建配置文件时添加/删除设备。
回答by Dattatray Deokar
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.
如果您能够在调试模式下安装应用程序,则您使用的是分发证书而不是开发证书,但安装完成后它会自动关闭。
回答by Sahil Doshi
One of the way to resolve IOS Codesigning issue is follow following Document.
解决 IOS 编码问题的方法之一是遵循以下文档。
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.
更改系统中的任何内容后,请始终清理并构建您的项目,以了解解决方案是否成功应用。