xcode iOS:配置文件缺少私钥?

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

iOS: Provisioning profile missing private key?

iosxcode

提问by Wells

In my Keychain, I have my iOS developer certificate, along with its nested private key.

在我的钥匙串中,我有我的 iOS 开发人员证书,以及它嵌套的私钥。

In the Apple developer center, I created a provisioning profile under Distribution for my app, and downloaded it. When I bring it into Xcode, I see the provisioning profile but it says "valid signing identity not found" and I can't properly build an archive for ad hoc distribution.

在 Apple 开发人员中心,我在分发下为我的应用程序创建了一个配置文件,并下载了它。当我将它带入 Xcode 时,我看到了配置文件,但它显示“未找到有效的签名身份”,并且我无法为临时分发正确构建存档。

How can I resolve this? Like I said, under my Keychain, I have my private key AND my developer profile certificate.

我该如何解决这个问题?就像我说的,在我的钥匙串下,我有我的私钥和我的开发人员配置文件证书。

回答by MikeT

In the apple developer's Certificates, Identifiers and Profiles section, you have an option to generate a certificate for ad-hoc or app store. After selection that, you should have to create a signing request such as this screen...

在苹果开发者的证书、标识符和配置文件部分,您可以选择为临时或应用商店生成证书。选择后,您应该创建一个签名请求,例如此屏幕...

CSR screenshot

企业社会责任截图

once you created a certificate, then proceed to create a provisioning profile with THAT certificate.

创建证书后,请继续使用该证书创建配置文件。

回答by jancakes

When you were creating your provisioning profile in the provisioning portal your first step would have been to select Distribution or Development (you selected Distribution).

当您在配置门户中创建您的配置文件时,您的第一步是选择分发或开发(您选择了分发)。

Then in the second step you were supposed to select app ID (make sure this app ID matches the bundle ID of your app).

然后在第二步中,您应该选择应用 ID(确保此应用 ID 与您的应用的捆绑 ID 匹配)。

Then on the next screen you select the certificate with which to sign this provisioning profile. Make sure this is the same certificate that you downloaded. It needs to be a special distribution certificate that you would have created beforehand. Note the name and the expiration date of the certificate, then download this certificate from the Production section in Certificates.

然后在下一个屏幕上选择用于签署此配置文件的证书。确保这与您下载的证书相同。它需要是您事先创建的特殊分发证书。记下证书的名称和到期日期,然后从证书的生产部分下载此证书。

回答by Sumona Salma

There are some few steps to get it working:

有几个步骤可以让它工作:

  1. Request a certificate from Keychain Access -> Certificate Assistant
  2. Add iOS Certificate from developer.apple.com -> Certificates, Identifiers & Profiles -> Certificates
  3. Download that certificate
  4. Then add iOS Provisioning Profiles with that Certificate
  1. 从 Keychain Access -> Certificate Assistant 请求证书
  2. 从 developer.apple.com 添加 iOS 证书 -> Certificates, Identifiers & Profiles -> Certificates
  3. 下载那个证书
  4. 然后使用该证书添加 iOS 配置文件

It worked for me.

它对我有用。