版权声明:本文为博主原创文章,转载请附上本文链接地址。from : https://blog.csdn.net/lovechris00 https://blog.csdn.net/lovechris00/article/details/84887114
现象描述
现象一:
下载完证书安装后,运行失败,提示:
Showing All Messages
:-1: Missing private key for signing certificate. Failed to locate the private key matching certificate "iPhone Developer: aaa (1NWR2755BZ)" in the keychain. To sign with this signing certificate, install its private key in your keychain. If you don't have the private key, select a different signing certificate for CODE_SIGN_IDENTITY in the build settings editor. (in target 'ADemo')
现象二:
打开 Xcode - perference - Accounts ,选中ID 后,点击右下角 Manage Certificate,certificate 显示 Not In Keychain
。
现象三:
打开钥匙串,这个证书前面没有三角形,在上方的描述为:此证书已标记为受此账户信任
。
***
而其他正常使用的证书签名有三角形,上面标记为 此证书有效
。点击三角形,可以发现一个小钥匙。
原因 & 解决方法
没有根证书 p12 导致的。
使用钥匙串创建 证书请求的电脑,会存在这份 p12 文件。从他的电脑导出 p12,复制到此电脑双击安装即可。