xcode 配置文件“未找到有效签名身份”错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18568920/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 04:54:01  来源:igfitidea点击:

Provisioning Profile 'Valid signing identity not found' error

xcodekeychainprovisioning-profile

提问by nanothread59

I have an app that is ready for testing on my iPad, and I've created a development provisioning profile, matched up the bundleID and lowered the iOS deployment target. However when I downloaded the profile and dragged it into the organizer, it says 'Valid signing identity not found'. I'm pretty sure this has got to do with the certificates in the keychain and private keys (???) however I have no idea how to fix this problem.

我有一个应用程序可以在我的 iPad 上进行测试,我已经创建了一个开发配置文件,匹配了 bundleID 并降低了 iOS 部署目标。但是,当我下载配置文件并将其拖到组织者中时,它显示“未找到有效的签名身份”。我很确定这与钥匙串和私钥 (???) 中的证书有关,但是我不知道如何解决这个问题。

Can someone please point me to a tutorial or give me some advice on adding certificates into the keychain without using Xcode; stuff like the 'use for development' button isn't working for me!

有人可以给我指点教程或给我一些关于在不使用 Xcode 的情况下将证书添加到钥匙串的建议吗?“用于开发”按钮之类的东西对我不起作用!

Note: The only valid Provisioning Profiles are distribution. When I try to click 'Renew' Xcode says 'No value was provided for the parameter 'CertificateIDs'. I hope this helps!

注意:唯一有效的配置文件是分发。当我尝试单击“更新”时,Xcode 显示“未为参数“CertificateIDs”提供值。我希望这有帮助!

回答by thatzprem

The .p12 file associated with your provisioning profile is not found in your system keychain.

在您的系统钥匙串中找不到与您的配置文件关联的 .p12 文件。

Check the below few things!

检查以下几件事!

  • Make sure you have enabled the correct certificate while generating the provisioning profile in the apple developer site.
  • Check if you have any duplicates of the your certificate & private key more than once in your keychain access.
  • If you do not have the .p12 corresponding to the provisioning profile, Get it exported from the mac system on which it was created & install it in your mac system.
  • 确保在苹果开发者站点中生成配置文件时启用了正确的证书。
  • 检查您的钥匙串访问中是否有多次重复的证书和私钥。
  • 如果您没有对应于配置文件的 .p12,请从创建它的 mac 系统导出并将其安装在您的 mac 系统中。

回答by Jitendra

Check your code signing identity set your profile there. and your Provisioning profile bundle id is same as your app bundle identifier.

检查您的代码签名身份,在那里设置您的个人资料。并且您的配置文件包 ID 与您的应用包标识符相同。

回答by Vinzzz

To do a valid code-signing - without using XCode - you need a valid certificate and key, corresponding to the provisioning profile :

要进行有效的代码签名 - 不使用 XCode - 您需要一个有效的证书和密钥,对应于配置文件:

  • check with Keychain Access that you indeed have a 'iPhone distribution' certificate, with its own private key.

  • Make sure this is the same certificate that was used on 'provisioning portal' to create you developement / distribution profile. If not, create a new one, or import the certificate from the other Mac you used when you created the provisioning

  • Download the provisioning profile, and just double-click it.

  • 使用 Keychain Access 检查您确实拥有“iPhone 发行版”证书,以及它自己的私钥。

  • 确保这与在“供应门户”上用于创建开发/分发配置文件的证书相同。如果没有,请创建一个新证书,或从您在创建配置时使用的另一台 Mac 导入证书

  • 下载配置文件,然后双击它。

回答by Robert Noack

Posting this here because none of the other answers really went into enough detail to help me and I still had to figure it out on my own.

在这里发布这个是因为其他答案都没有真正详细地帮助我,我仍然必须自己弄清楚。

On the apple developer website, log in and under certificates click 'All'. The certificate needs to be generated on YOUR machine and with YOUR account or things do not build. This is what confused me... You can click the + icon and make a new certificate (development, or distribution). If it does not let you select for example Distribution, it's because there are already too many certificates in the account. So first, you have to delete an older certificate.

在苹果开发者网站上,登录并在证书下单击“全部”。证书需要在您的机器上使用您的帐户生成,否则无法生成。这让我很困惑...您可以单击 + 图标并制作新证书(开发或分发)。如果它不让您选择例如分发,那是因为帐户中的证书太多。因此,首先,您必须删除旧证书。

1) Delete the oldest certificate in the portal
2) Click the + and create a new certificate -- this will guide you through opening Keychain Access on your machine and requesting a certificate from apple, and you will have to save a file and upload it to the developer portal to create the certificate.
3) Download the new certificate and it will add to Keychain access
4) Go back to provisioning profiles on dev portal, click EDIT on the one you are trying to use and change it to use the newly generated certificate.
5) Download and click the provisioning profile
6) Everything works great.

1) 删除门户中最旧的证书
2) 单击 + 并创建一个新证书——这将引导您在您的机器上打开 Keychain Access 并从 Apple 请求证书,您必须保存文件并上传它到开发人员门户以创建证书。
3) 下载新证书,它将添加到钥匙串访问
4) 返回开发门户上的配置文件,在您尝试使用的那个上单击编辑并将其更改为使用新生成的证书。
5) 下载并单击配置文件
6) 一切正常。

This process actually was not that difficult, but for some reason I could not find the correct explanation anywhere. I hope this will help someone.

这个过程其实并没有那么难,但是由于某种原因,我在任何地方都找不到正确的解释。我希望这会帮助某人。

回答by CpnCrunch

I had the same issue. I did have all the private keys and everything was correct, but xcode refused to build and kept saying that I didn't have a valid provisioning profile and organiser showed 'valid signing identity not found'.

我遇到过同样的问题。我确实拥有所有私钥并且一切都正确,但是 xcode 拒绝构建并一直说我没有有效的配置文件,并且组织者显示“未找到有效的签名身份”。

The solution involved:

解决方案涉及:

  • revoking my developer certificate and development provisioning profiles from the ios provisioning portal
  • deleting those certificates from keychain
  • try building again and tell xcode to 'fix issue'
  • 从 ios 配置门户撤销我的开发人员证书和开发配置文件
  • 从钥匙串中删除这些证书
  • 尝试再次构建并告诉 xcode '修复问题'

This lets XCode manage the certificates, and it magically worked.

这让 XCode 管理证书,它神奇地工作。

However on another project I still had the problem, and it was solved by this answer:

但是在另一个项目中,我仍然遇到了问题,并通过以下答案解决了这个问题:

https://stackoverflow.com/a/18966088/1192732

https://stackoverflow.com/a/18966088/1192732