ios 供应配置文件不包括应用程序标识符和钥匙串访问组权利

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

Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements

iosxcode

提问by Hyman A

I've tried all the other questions and searched everything on this that I could already, a lot of the other questions involved existing apps that were being updated or people with developer accounts but this is like my second time using Xcode and it has worked before.

我已经尝试了所有其他问题并搜索了所有我已经可以解决的问题,很多其他问题涉及正在更新的现有应用程序或拥有开发人员帐户的人,但这就像我第二次使用 Xcode 并且它以前工作过.

This just happened out of nowhere. I keep getting these two errors and it allows me to run simulators but not build onto my iPhone:

这只是突然发生的。我不断收到这两个错误,它允许我运行模拟器但不能构建到我的 iPhone 上:

  1. Automatic signing is unable to resolve an issue with the "LearningSpriteKit" target's entitlements. Automatic signing can't add the application-identifier and keychain-access-groups entitlements to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code.

  2. Provisioning profile "iOS Team Provisioning Profile: #####.LearningSpriteKit" doesn't include the application-identifier and keychain-access-groups entitlements.

  1. 自动签名无法解决“LearningSpriteKit”目标的权利问题。自动签名无法将 application-identifier 和 keychain-access-groups 权利添加到您的配置文件中。切换到手动签名并通过从开发人员网站下载匹配的配置文件来解决问题。或者,要继续使用自动签名,请从您的权利文件中删除这些权利,并从您的代码中删除它们的相关功能。

  2. 供应配置文件“iOS 团队供应配置文件:#####.LearningSpriteKit”不包括应用程序标识符和钥匙串访问组权利。

采纳答案by yeralin

This issue is related to Bug 1534145. SSL.com: P-384 curve / ecdsa-with-SHA256 certificates.

此问题与错误 1534145相关。SSL.com:P-384 曲线/ecdsa-with-SHA256 证书

A representative from Apple estimated 558,000 certificates to become invalidated: Bug 1533655. DigiCert: Apple: Non-compliant Serial Numbers

Apple 的一位代表估计有 558,000 个证书将失效:错误 1533655。DigiCert:Apple:不合规的序列号

GoDaddy, Google, Apple and Facebook (that would explain why Facebook was glitchy today) are affected.

GoDaddy、谷歌、苹果和 Facebook(这可以解释为什么 Facebook 今天出现故障)受到影响。

They are working on resolving the issue right now.

他们现在正在努力解决这个问题。

That would explain our problems, folks!

这将解释我们的问题,伙计们!

Update: The issue has been resolved. Try to refresh your projects.

更新:问题已解决。尝试刷新您的项目。

回答by yycking

Workaround: change Bundle Identifierand/or Version.

解决方法:更改Bundle Identifier和/或Version

回答by David Gish

I restored a profile from Time Machine when this was working and upon launch, Xcode immediately deletes and replaces it with a new one. The key difference seems to be the old profile has the get-task-allowentitlement while the new one has NO entitlements. This is definitely broken at Apple's end.

我在运行时从 Time Machine 恢复了一个配置文件,在启动时,Xcode 立即删除并用新的替换它。主要区别似乎是旧配置文件具有get-task-allow权利,而新配置文件没有权利。这在 Apple 结束时肯定会被打破。

Edit: The entitlements should also include a keychain access group, but again, no entitlements at all. Should look like:

编辑:权利还应包括钥匙串访问组,但同样,根本没有权利。应该看起来像:

Good entitlements

良好的权利

回答by CodeChanger

EDIT

编辑

As per latest update Apple successfully resolved Automatically Code Sign with Free Accountissue.

I tried it and I can confirm its resolved.

Please try at your end.

根据最新更新,Apple 成功解决了使用免费帐户自动进行代码签名的问题。

我试过了,我可以确认它已解决。

请尝试在你的最后。

Update

更新

Tested with Latest XCode 10.2and it's working fine + they improved performance of overall Xcode & codesign feature.

使用最新的XCode 10.2 进行测试,并且运行良好 + 它们提高了整体 Xcode 和协同设计功能的性能。

I am also facing the same issue while I am creating a new Profile from Xcode and if I go to other projects and check over there also I am facing the same issue as below.

当我从 Xcode 创建一个新的配置文件时,我也面临同样的问题,如果我去其他项目并在那里检查,我也会面临与下面相同的问题。

Enter image description here

在此处输入图片说明

Due to this issue, none of my projects can build with the old profile and certificate.

由于这个问题,我的项目都不能使用旧的配置文件和证书构建。

The strange issue, so I checked a newly created Profile and compared with the old one, and I found that App IDis unknown as well as there were no Entitlement details in the newly created profile.

奇怪的问题,于是我查看了一个新创建的配置文件并与旧配置文件进行了比较,我发现新创建的配置文件中App ID未知,并且没有授权详细信息。

Check the below screenshots of the old and new profile comparison:

检查新旧配置文件比较的以下屏幕截图:

Old Profile:

旧资料:

Enter image description here

在此处输入图片说明

New Profile:

新的配置文件:

Enter image description here

在此处输入图片说明

So it means it's not able to set App Idand Entitlementsin the new profile. So the end result does not work all old profiles and giving the same error in all projects.

所以这意味着它无法在新配置文件中设置App IdEntitlements。因此,最终结果不适用于所有旧配置文件并在所有项目中出现相同的错误。

Issue Workaround:

问题解决方法:

Step1:Go to Provisioning Profile folder (path: ~?Library? ? ?MobileDevice? ? ?Provisioning Profiles?).

步骤 1:转到 Provisioning Profile 文件夹(路径:~?Library? ? ?MobileDevice? ? ?Provisioning Profiles?)。

Or use a shortcut to jump directly into this folder like CMD+ Shift+ Gand enter ~/Library/MobileDevice/Provisioning Profilesit will redirect your finder directly on the Provisioning Profiles folder.

或者使用快捷方式直接跳转到该文件夹​​,如CMD+ Shift+G并输入~/Library/MobileDevice/Provisioning Profiles它将直接在 Provisioning Profiles 文件夹中重定向您的查找器。

Step2:Sort the files inside that folder by Date Modified.

步骤2:按修改日期对该文件夹内的文件进行排序。

Step3:Check profile with Unknown App Id and delete all unknown profiles.

步骤 3:检查具有未知应用程序 ID 的配置文件并删除所有未知配置文件。

Step4:Come back on Xcode and check all old projects will work as expected.

步骤 4:返回 Xcode 并检查所有旧项目是否按预期工作。

Note: Make sure none of your project open while doing above changes. Otherwise, it will create a new profile with Unknown App Id.

注意:确保在进行上述更改时没有打开任何项目。否则,它将创建一个具有未知应用程序 ID 的新配置文件。

I hope this will help and Apple will solve this bug soon!

我希望这会有所帮助,Apple 会尽快解决这个错误!

回答by Oleh Zayats

It seems Apple broke the automatic signing system. I was playing around with a few projects and Xcode just fetches the incorrect profile.

苹果似乎打破了自动签名系统。我正在玩几个项目,而 Xcode 只是获取了不正确的配置文件。

This worked for me:

这对我有用:

  1. Turn off "Automatically manage signing" in project target
  2. Go to ~/Library?/?MobileDevice?/?Provisioning Profiles?
  3. Remove previously downloaded profiles
  4. Turn on "Automatically manage signing" again
  1. 关闭项目目标中的“自动管理签名”
  2. ~/Library?/?MobileDevice?/?Provisioning Profiles?
  3. 删除以前下载的配置文件
  4. 再次打开“自动管理签名”

回答by Fedorov7890

UPDATE: This solution still works as on 2019/Mar/20 7:00 UTC+0

更新:此解决方案仍然适用于 2019/Mar/20 7:00 UTC+0

SOLUTION: no Xcode reinstallation is required. I used a brand new free AppleId, but later checked with my old AppleID and it also works.

解决方案:不需要重新安装 Xcode。我使用了一个全新的免费 AppleId,但后来检查了我的旧 AppleID,它也可以使用。

  1. In Xcode, under the Generaltab, untick the Automatically manage signingoption
  2. Close Xcode.
  3. Erase old profiles in ~/Library/MobileDevice/Provisioning Profiles:

    cd ~/Library/MobileDevice/Provisioning\ Profiles
    
    rm -rf *
    
  4. On MacOS, run LaunchpadOtherKeychain Accessand remove all certificates related to iPhone development, like the following four on the picture:

    • Apple Worldwide Developer Relations Certification Authority
    • Developer ID Certification Authority
    • iPhone Developer: your_name_or_email

      Remove certificates

  5. Uninstall the old app on iPhone. Restart both iPhone and Mac

  6. Open Xcode and change the Bundle Identifier of your app, at least one character (later you may revert this change)
  7. Enable the Automatically manage signingoption in Xcode.
  1. 在 Xcode 中,在常规选项卡下,取消勾选自动管理签名选项
  2. 关闭 Xcode。
  3. 删除 中的旧配置文件~/Library/MobileDevice/Provisioning Profiles

    cd ~/Library/MobileDevice/Provisioning\ Profiles
    
    rm -rf *
    
  4. 在 MacOS 上,运行LaunchpadOtherKeychain Access并删除所有与 iPhone 开发相关的证书,如图中的以下四个:

    • Apple 全球开发者关系认证机构
    • 开发者 ID 证书颁发机构
    • iPhone 开发者:your_name_or_email

      删除证书

  5. 卸载 iPhone 上的旧应用。重新启动 iPhone 和 Mac

  6. 打开 Xcode 并更改您的应用程序的 Bundle Identifier,至少一个字符(稍后您可以恢复此更改)
  7. Automatically manage signing在 Xcode 中启用该选项。

After this you should be able to run and debug your app on your device.

在此之后,您应该能够在您的设备上运行和调试您的应用程序。

If you have a “iPhone has denied the launch request” problem, the solution is in an answer to Stack Overflow question iOS 12 iPad Denied Launch Request - Xcode.

如果您遇到“iPhone has denied the launch request”问题,解决方案是对 Stack Overflow 问题iOS 12 iPad Denied Launch Request - Xcode回答

In short, you need in Xcode to go to menu ProductSchemeEdit Scheme...and select Executable: ask on launch.

简而言之,您需要在 Xcode 中转到菜单ProductSchemeEdit Scheme...并选择Executable: ask on launch

回答by Dani

This issue has been resolved, BUT some people still have a problem with it. If you're one of them, try the following:

这个问题已经解决了,但有些人仍然有问题。如果您是其中之一,请尝试以下操作:

1.In the General tab of target settings - uncheck the Automatically manage signingoption

1.在目标设置的常规选项卡中 - 取消选中自动管理签名选项

2.Close Xcode (fully, not just your project)

2.关闭 Xcode(完全关闭,而不仅仅是你的项目)

3.Erase .mobileprovisionfiles under ~/Library/MobileDevice/Provisioning Profiles/

3.擦除.mobileprovision下的文件~/Library/MobileDevice/Provisioning Profiles/

4.In Keychain Access, delete the following:

4.Keychain Access 中,删除以下内容:

  • iPhone Developer: [email protected]
  • Developer ID Certification Authority
  • Apple Worldwide Developer Relations Certification Authority 3.
  • iPhone 开发者:[email protected]
  • 开发者 ID 证书颁发机构
  • Apple 全球开发者关系认证机构 3.

5.Delete the app on your iOS devices

5.删除 iOS 设备上的应用程序

6.Restart your Mac and iOS devices

6.重启你的 Mac 和 iOS 设备

7.Open Xcode again

7.再次打开Xcode

8.Change the Bundle Identifier (even if it's a single character, you'd change it back to the original after you get it going)

8.修改Bundle Identifier(即使是单个字符,使用后也要改回原来的)

9.Check the Automatically manage signingoption

9.勾选Automatically manage signing选项

10.Use USB to connect your iPhone/iPad.

10.使用 USB 连接您的 iPhone/iPad。

11.Make sure you trust your certificate on your iOS devices

11.确保您信任 iOS 设备上的证书

This should do work for you.

这应该对你有用。

回答by Husein Behboodi Rad

It seems that this problem has been resolved now and the personal accounts can resign their apps automatically again.

现在这个问题似乎已经解决了,个人账户可以再次自动退出他们的应用程序。

Regarding to @Paul answer, it is not related to uninstalling Xcode. It is fixed from the server side.

关于@Paul 的回答,它与卸载 Xcode 无关。它是从服务器端修复的。

The only thing that is required is removing Apple Developer Certificate (for the personal account) from your keychain, so that Xcode retries to generate and download a new one.

唯一需要做的是从您的钥匙串中删除 Apple Developer Certificate(用于个人帐户),以便 Xcode 重试生成并下载一个新证书。

回答by Alirezak

Here is the solution:

这是解决方案:

  1. Let Xcode be open.

  2. Select your developer account and let the error appear again.

  3. Go to the keychain app

  1. 让Xcode打开。

  2. 选择您的开发者帐户,然后再次出现错误。

  3. 转到钥匙串应用

4.a) Goto certificate section

4.a) 转到证书部分

4.b) Remove All(valid and invalids) certificates (I have three valid and many invalid!)

4.b)删除所有(有效和无效)证书(我有三个有效和许多无效!)

Remove certificates

删除证书

  1. After removing the last certificate, macOS will recreate a new certificate for the active developer account automatically.

  2. Run your app in your iDevice. You need to enter your system password to add newly created certificate into the Keychain.

  1. 删除最后一个证书后,macOS 会自动为活动的开发者帐户重新创建一个新证书。

  2. 在您的 iDevice 中运行您的应用程序。您需要输入系统密码才能将新创建的证书添加到钥匙串中。

If in the second run it says

如果在第二次运行它说

Your iPhone has denied the launch request

您的 iPhone 拒绝了启动请求

Just go to:

只需前往:

ProductScheme→ *edit scheme: uncheck "Debug executable"

产品方案→*编辑方案:取消选中“调试可执行文件”

I hope it solves your problem.

我希望它能解决你的问题。

回答by J. Doe

I got it to work by doing the following steps:

我通过执行以下步骤使其工作:

  1. Go to Xcode
  2. Preferences
  3. Accounts
  4. Manage certificates
  5. Plus sign
  6. iOS Development
  7. Done
  8. Download manual Profiles
  9. Close
  10. Go to your target
  11. Change development team to none
  12. Change development team to your previous team
  1. 转到 Xcode
  2. 喜好
  3. 帐户
  4. 管理证书
  5. 加号
  6. iOS开发
  7. 完毕
  8. 下载手册配置文件
  9. 关闭
  10. 去你的目标
  11. 将开发团队更改为无
  12. 将开发团队更改为您之前的团队

It should work.

它应该工作。