zoukankan      html  css  js  c++  java
  • Codesign error: Certificate identity appearing twice

    第一种解决方法:

    I think I figured out why the simple delete is not working. Because the dev certificate is still stored in the provision profile, when I close/re-open the Xcode after deleting the certificate in Keychain, I saw the old certificate come back. So I delete it again. It worked.

    The simple delete the profile solution did not work for me.

    Solution that worked in my case:

    1. Quit Xcode
    2. If the Keychain access is open, keep it open.
    3. Launch Xcode now.
    4. See that the certificate Xcode was complaining about will be re-added into the keychain at launch from its cache.
    5. Go ahead and delete it.
    6. Compile and happy coding.
    第二种解决方法:
    我解决了这个问题,自己来回答下吧:

    原因是keychain access中存在过期的'iPhone Distribution: xxxx',但没有显示在钥匙链/登录中,而是在钥匙链/系统中,并且是隐藏的,因此需要在钥匙链->显示->显示过期证书,然后把钥匙链下的登录和系统的过期证书都删掉。

    而且我在搜寻答案的时候,看到一篇帖子,有可能删除过期证书失败,但是在keychain里面却显示删除成功,这个问题的解决方法是重启keychain,删除,重复这个过程直到真正删除成功。

    有时候在keychain里面找不到已过期、多余的证书,但我们在xcode的target的building setting的code signing里面却能够看到多余的证书,这个就证明我们的keychain并没有清楚干净。

    总结下,解决这个问题的步骤是:1.清掉keychain里面多余的证书。2.刷新xcode里面的provisioning profile。

    下面贴出官方的Troubleshooting:

    This error indicates that while searching all keychains, Xcode found more than one signing certificate for the same iOS developer program team member, and it does not know which one to use for code signing.

    To resolve the problem, use the following process to ensure that there is only one copy of each certificate type: "iPhone Developer" or "iPhone Distribution" within the entire keychain, for the same team member.

    In Keychain Access, make sure your "View" menu > Show Expired Certificates option is turned ON
    Click the "Certificates" 'Category' and then click through every one of the keychains you have listed in your 'Keychain' sidebar in Keychain Access. If you see any duplicates, even expired certificates, delete those duplicates.
    Click the "Keys" 'Category' in Keychain Access.
    Navigate through every keychain looking for and deleting any "Orphaned Keys" that have the same Common Name as the affected certificate. Orphaned keys are ones that are not bound by a Disclosure Triangle to an iPhone Developer or iPhone Distribution certificate that currently exists in the keychain.
    If you found and removed any extra keys or certificates, please reattempt your build.
    If the issue persists after removing all active or expired duplicate certificates or keys by the same common name, you might try removing *all* existing signing certificates and keys and replace them with new ones using the steps in How do I delete/revoke my certificates and start over fresh?.
    Finally, if the error persists even after creating new certificates, please control-click on the affected certificate in Keychain Access, choose "New Identity Preference" and click the 'Certificate' field. If you see duplicate certificates listed in here, this is an known and uncommon issue with Keychain Access. To work around the problem, try the following:
    Export your developer profile using the process in Transferring Your Identities.
    Create a new OS X User Account, install Xcode for the new user and import the developer profile created in the previous step. 

    版权声明:本文为博主原创文章,未经博主允许不得转载。

  • 相关阅读:
    微信小程序:模板消息推送提示{“errcode”:41030,”errmsg”:”invalid page hint: [gP1eXXXXXX]”}
    Linux 定时执行shell脚本命令之crontab
    Ubuntu16.04系统下 解决“无法获得锁 /var/lib/dpkg/lock -open (11:资源暂时不可用)、无法锁定管理目录(/var/lib/dpkg/),是否有其他进程正占用它?”的方法
    微信小程序:wx.request之post请求后端无法获取数据的问题
    jQuery获取浏览器参数
    Chrome等浏览器下出现net::ERR_BLOCKED_BY_CLIENT的解决办法
    Thinkphp3.2.3框架下封装公共的函数,例如封装CURL函数来获取接口数据
    Select下拉列表选择自动提交form表单数据
    一步一步从原理跟我学邮件收取及发送 5.C语言的socket示例
    一步一步从原理跟我学邮件收取及发送 4.不同平台下的socket
  • 原文地址:https://www.cnblogs.com/zsw-1993/p/4879911.html
Copyright © 2011-2022 走看看