无法将 Xamarin 应用程序部署到 IOS 设备(配置文件:缺少私钥)

发布于 2025-01-20 13:32:53 字数 1218 浏览 0 评论 0原文

我已使用 Xcode 版本 13.3 与我的 Mac 配对
我已经更新了我的 Apple 开发会员资格(个人)并获得了 <新团队 ID >。

在 Visual Studio 2022 (Windows) 中,我可以重新附加我的 Apple 帐户。
它显示<我的名字> 角色:媒体代理

:查看详细信息...
它显示:“加载您的证书时发生错误:如果出于安全原因禁止此请求:身份验证错误。需要 Xcode 7.3 或更高版本才能继续使用您的 Apple ID 进行开发”
评论:我刚刚使用与我的 Apple ID 相同的凭据登录。不明白。

按:确定
它说:“...需要 Apple 开发者计划的活跃会员资格才能配置 iOS 设备进行开发...”
评论:我有一个活跃的会员资格,这就是我尝试登录的会员资格。

在 Visual Studio 中、iOS 项目属性、iOS 捆绑包签名
选择:自动配置
选择团队:<我的名字> - 个人 - <新团队ID> (<我的电子邮件>)
它说:“出于安全原因,禁止此请求:身份验证错误......”
评论:我刚刚使用与我的 Apple ID 相同的凭据登录。不明白。

证书:
证书名称:
发布给:iPhone 开发者:<我的名字> (<旧团队 ID>)

标识符:

  • 捆绑包 ID:com。
    公司>.*
  • 应用程序 ID 前缀:<新团队ID>
  • 平台:iOS、macOS、tvOS、watchOS

配置文件:

  • 类型:开发
  • 到期时间:2023/04/11
  • 应用程序 ID:<新团队 ID>.com.<公司>.*
  • 证书:<我的名字> (iOS 开发)

在我的 Mac 上。
在钥匙串访问中,我可以看到我的证书:
发布给:iPhone 开发者:<我的名字> (<旧团队 ID>)
它没有私钥

在 Xcode 中:
iOS 开发证书
创建者:<我的名字>
状态:缺少私钥

如果问题是缺少私钥,如何添加私钥?
如果不是,可能是什么问题?

I've paired to my Mac with Xcode version 13.3
I've renewed my Apple Development Membership (Individual) and got a < new Team ID >.

In Visual Studio 2022 (Windows) I can re-attach my Apple Account.
It shows < my name>
Role: Agent

Press: View Details...
It says: "There was an error while loading your certificates: This request if forbidden for security reasons: Authentication Error. Xcode 7.3 or later is required to continue developing with your Apple ID"
Comment: I just signed in with same credentials as for my Apple ID. Don't understand.

Press: OK
It says: ".... An active membership to the Apple Developer Program is required to provision iOS devices for development..."
Comment: I've an active membership and that is the one I try to sign in with.

In Visual Studio, iOS project properties, iOS Bundle Signing
Select: Automatic Provisioning
Select Team: < my name> - Individual - < new Team ID> (< my email>)
It says: "This request is forbidden for security reasons: Authentication Error. ...."

Comment: I just signed in with same credentials as for my Apple ID. Don't understand.

Certificates:
Certificate Name:
Issued To: iPhone Developer: < my name> (< old Team ID>)

Identifier:

  • Bundle ID: com.< company>.*
  • App ID Prefix: < new Team ID>
  • Platform: iOS, macOS, tvOS, watchOS

Provisioning Profile:

  • Type: Development
  • Expires: 2023/04/11
  • App ID : < new Team ID>.com.< company>.*
  • Certificate: < my name> (iOS Development)

On my Mac.
In Keychain Access, I can see my certificate:
Issued To: iPhone Developer: < my name> (< old Team ID>)
It has no private key

In Xcode:
iOS Development Certificates
Creator: < my name>
Status: Missing Private Key

If missing private key is the issue, how do I add one?
If not , what can be the issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

甚是思念 2025-01-27 13:32:53

苹果又变了。您必须下载最新版本的 Visual Studio(在发布时,仅提供预览版 17.3.0 预览版 2)。

安装后,转到“选项 > Xamarin > 应用帐户”。删除现有的并重新添加。现在它会要求提供发行者 ID、密钥 ID 和密钥 ID。私钥路径。谷歌或查看教程以了解如何获取这些内容。

其次,登录您的Apple App Store Connect帐户,进入“协议”选项卡,它们可能是新协议,您需要同意连接才能工作。对我来说,我需要填写税务居民和税务居民。 “付费应用程序”协议上的银行详细信息。银行详细信息可能需要一段时间才能完成处理。

Apple has changed again. You have to download the latest version of Visual Studio (at the time of post, only Preview version 17.3.0 Preview 2 available).

After install, go to "Options > Xamarin > Apply Account". Remove the existing and add again. It will now ask for Issuer ID, Key ID & Private key path. Google or check on the tutorial on where to get these.

Secondly, login to your Apple App Store Connect account, go to the "Agreements" tab, they could be new agreement that you need to agree for the connection to work. For me I need to fill in the tax resident & bank details on the "Paid App" agreement. It may take awhile for the bank details to complete processing.

心如狂蝶 2025-01-27 13:32:53

上面 Jason 评论中的链接就是答案:它坏了,微软花了很长时间来修复它。我也有同样的问题,我担心苹果公司删除一段时间未更新的应用程序的新政策可能会导致我的应用程序被删除,因为在这个问题解决之前我无法更新它。

The link in Jason's comment above is the answer: its broken, and Microsoft are taking a very long time to fix it. I have the same issue, and am worried that Apple's new policy of delisting apps that haven't been updated in a while might cause my app to be delisted, as I cannot update it until this is fixed.

乖不如嘢 2025-01-27 13:32:53

该线程包含可能对您有用的解决方法,除此之外,它是在Microsoft的帐户上。

  1. 在Xcode的Mac上,确保您的证书和个人资料已下载(Xcode-&Gt; periences- eaccept- eaccept)

  2. 在钥匙扣访问中的Mac上,导出您的开发证书并提供p12文件的密码(keychainAccess/my my
    证书,文件 - &gt;导出项目),将p12复制到PC桌面2上
    您的Mac在Finder中
    文件夹 - &gt;〜/library/mobiledevice/provisioning配置文件,复制全部

    %home%\ appdata \ local \ xamarin \ ios \ provisioning \ profiles

  3. 在您的PC上,打开Visual Studio,然后使用Tools-&gt; option
    盒子下方的名称

  4. 单击“查看详细信息”,然后等待旋转器投掷现在熟悉的错误

  5. 单击“导入证书”,选择您在步骤1中复制的证书,然后输入您选择的密码

  6. 将会遇到更多错误,但证书将被进口到
    %home%\ appdata \ local \ xamarin \ ios \ provisioning \证书

  7. 关闭并重新打开vs或至少是VS解决方案(可能是不必要的,但嘿)

  8. 在您的VS iOS项目中,单击属性,您现在应该能够选择新证书和所需的配置文件

  9. 在配置设备上构建并运行。

该问题是通过Visual Studio不跟进XCode 13.3的Apple Developer API的更新引起的。

您可以通过手动将配置文件/证书添加到Windows计算机上来绕过它。

对于我来说,实际上只需通过门户手动创建配置文件并将其下载到该目录中就足够了。

The thread contains a possible workaround that might work for you, beyond that it's on the account of Microsoft.

  1. On your Mac in XCode, ensure your certificates and profiles are downloaded (Xcode->Preferences->Accounts)

  2. On your Mac in Keychain Access, export your development certificate and provide a password for the p12 file (KeychainAccess/My
    Certificates, File->Export Items), copy the p12 to the PC Desktop 2 On
    your Mac in Finder, Go->Go to
    Folder->~/Library/MobileDevice/Provisioning Profiles, copy all
    .mobileprovision files to your PC into
    %HOME%\AppData\Local\Xamarin\iOS\Provisioning\Profiles

  3. On your PC, open Visual Studio and then Tools->Options->Xamarin->Apple Accounts, click the account and also
    the name in the box below

  4. Click “View Details” and wait for the spinners to throw the now-familiar errors

  5. Click “Import Certificate”, choose the certificate you copied in step 1, and enter the password you chose

  6. More errors will be thrown, but the certificate will have been imported into
    %HOME%\AppData\Local\Xamarin\iOS\Provisioning\Certificates

  7. Close and reopen VS or at least the VS solution (might be unnecessary but hey)

  8. In your VS iOS project, click Properties and you should now be able to select the new certificate and the desired profile

  9. Build and run on the provisioned device(s).

The issue is caused through Visual Studio not following up with updates on the Apple Developer API as of XCode 13.3.

You can bypass this by manually adding the profiles/certificates onto your windows machine.

As for me it was actually enough to just manually create the profiles through the portal and downloading them into the said directory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文