在使用 iOS App Signer 进行签名时,打开软件后弹出如下对话框:

image-20210326175654643

这个软件可以自动修复,点 “Yes” 修复后还是可能有问题,经过验证和走查这个软件的代码,这个修复无非就是重新添加苹果个一个根证书 “Apple Worldwide Developer Relations Certification Authority”

iOS App Signer 获取 codsigning certificates 的命令其实是:

/usr/bin/security find-identity -v -p codesigning

这个命令的作用是找到可以签名苹果开发者证书,没有证书的执行结果为:

0 valid identities found

其实证书是有的,只不过并没有生效,我们执行如下命令查看所有苹果开发者证书:

/usr/bin/security find-identity

# 执行结果
Policy: X.509 Basic
  Matching identities
  1) CBECDEC310BCCBA78757CCB5E0E900281FC8FB25 "ExpressVPN Client" (CSSMERR_TP_NOT_TRUSTED)
  2) 72D8752A710F4EF286AE3B3DD10213FB736C76A3 "Apple Development: xxx (GC2H3795Y8)" (CSSMERR_TP_NOT_TRUSTED)
     2 identities found

  Valid identities only
     0 valid identities found

打开钥匙串,找到我的苹果开发者证书

image-20210326180731698

选择始终信任后,再次执行如下命令,可以看到有效的证书有一个了:

/usr/bin/security find-identity

# 执行结果
Policy: X.509 Basic
  Matching identities
  1) CBECDEC310BCCBA78757CCB5E0E900281FC8FB25 "ExpressVPN Client" (CSSMERR_TP_NOT_TRUSTED)
  2) 72D8752A710F4EF286AE3B3DD10213FB736C76A3 "Apple Development: xxx (GC2H3795Y8)"
     2 identities found

  Valid identities only
  1) 72D8752A710F4EF286AE3B3DD10213FB736C76A3 "Apple Development: xxx (GC2H3795Y8)"
     1 valid identities found


↙↙↙阅读原文可查看相关链接,并与作者交流