ios Xcode 8.1“配置文件不包括 aps-environment 权利”

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

Xcode 8.1 "Provisioning profile doesn't include the aps-environment entitlement"

iosxcodexcode8code-signingprovisioning-profile

提问by Anderson Katao

Is anyone experiencing this problem?

有没有人遇到这个问题?

After persistence problemas and information retrieval on the KeyChain I had enable the KeyChain Sharing feature in Capabilities. This was to create a file called .entitlements

在 KeyChain 上的持久性问题和信息检索之后,我启用了 Capabilities 中的 KeyChain Sharing 功能。这是为了创建一个名为 .entitlements 的文件

So, when I gonna run the Archive this error occurs:

因此,当我要运行存档时,会发生此错误:

Check Dependencies:  
Provisioning profile doesn't include the aps-environment entitlement.  
Code signing is required for product type 'Application' in SDK 'iOS 10.1'

I'm using OS El Capitan 10.11.6, Xcode 8.1

我使用的是 OS El Capitan 10.11.6、Xcode 8.1

If anyone can help.

如果有人可以帮忙。

Pleaseeee....

请....

回答by lostInTransit

Check the Capabilitiestab on your target and make sure the Add the Push Notifications entitlement to your entitlements fileshows a check mark (under Push Notifications). If it shows an error, fix and you should be good to go.

检查Capabilities目标上的选项卡并确保Add the Push Notifications entitlement to your entitlements file显示复选标记(在Push Notifications 下)。如果它显示错误,请修复,您应该很高兴。

回答by Ted

For my case, Xcode 9

就我而言,Xcode 9

Case 1:

情况1:

I used fastlane matchbefore I added push notification capability and entitlement file.

在添加推送通知功能和权利文件之前,我使用了fastlane 匹配

Solution 1:

解决方案1:

Run fastlane match again. It will detect that the provisioning profile is no longer valid since you added capabilities and will regenerate again, and push to your repo.

再次运行 fastlane 匹配。由于您添加了功能,它将检测到配置文件不再有效,并将再次重新生成,并推送到您的存储库。

Case 2:

案例2:

I used fastlane matchbefore I added push notification capability and entitlement file.

在添加推送通知功能和权利文件之前,我使用了fastlane 匹配

I regenerated the invalid provisioning profile in the developer.apple.com account manually. So when I ran match, I got error

我在 developer.apple.com 帐户中手动重新生成了无效的配置文件。所以当我跑比赛时,我得到了错误

Provisioning profile '4d89b10f-568e-400d-a4e9-c96e0a51fd46' is not available on the Developer Portal for the user [email protected] Make sure to use the same user and team every time you run 'match' for this Git repository. This might be caused by deleting the provisioning profile on the Dev Portal

用户 [email protected] 的开发人员门户上没有供应配置文件“4d89b10f-568e-400d-a4e9-c96e0a51fd46” 确保每次为此 Git 存储库运行“匹配”时都使用相同的用户和团队。这可能是由于删除 Dev Portal 上的配置文件引起的

this may also happen when you press Fix Issuefrom Xcode

当您Fix Issue从 Xcode按下时也可能发生这种情况

Solution 2:

解决方案2:

Step1: delete the invalid provisioning profile from your certificatesrepo enter image description hereStep2: run

步骤 1:从您的存储certificates库中 删除无效的配置文件步骤 2:运行在此处输入图片说明

fastlane match

回答by codingFriend1

It can happen that you have two entries for the "Apple Push Notifications Service" in your Entitlements file. This seems to be a bug in XCode (even in v8.2), which it cannot resolve by itself.

您的权利文件中可能有两个“Apple 推送通知服务”条目。这似乎是 XCode(即使在 v8.2 中)中的一个错误,它无法自行解决。

Open your Entitlements file in the text editor of your choice.

在您选择的文本编辑器中打开您的权利文件。

I had the following duplicate entries in my Entitlements file:

我的权利文件中有以下重复条目:

<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.aps-environment</key>
<string>development</string>

Try deleting one of the two key-value pairs. For me, deleting the first entry aps-environmentsolved the issue.

尝试删除两个键值对之一。对我来说,删除第一个条目aps-environment解决了这个问题。

回答by Kunal Verma

When you add push notifications to your app.

当您向应用程序添加推送通知时。

If you already have a provisioning profile.

如果您已经有一个配置文件。

It will become invalid.

它将变得无效。

You have to go to developer.apple.com

你必须去 developer.apple.com

Edit your provisioning profile.

编辑您的配置文件。

Then download the newly created one and double click on the same.

然后下载新创建的并双击它。

XCode will automatically replace the last one which became invalid.

XCode 将自动替换最后一个无效的。

回答by Sreejit

Also verify that the apple id that you created on the Developer portal (developer.apple.com) has Push Notifications enabled. I faced it when I created the provisioning profile before enabling push notification on the app id so I had to edit the app id.

还要验证您在开发者门户 (developer.apple.com) 上创建的 Apple ID 是否启用了推送通知。在启用应用程序 ID 上的推送通知之前创建配置文件时,我遇到了它,因此我必须编辑应用程序 ID。

回答by Ashish

Target -> Capabilities

目标 -> 能力

Make sure the Add the Push Notifications entitlement to your entitlements file shows a check mark under Push Notifications.

确保将推送通知权利添加到您的权利文件在推送通知下显示复选标记。

If it shows an error, than fix it.

如果它显示错误,则修复它。

enter image description here

在此处输入图片说明

回答by Gustavo Vollbrecht

Make sure your project Bundle Identifier matches the App ID certificate at Developer portal.

确保您的项目捆绑标识符与开发人员门户上的 App ID 证书相匹配。

回答by boraberka

i added this to my entitlements.plist and it's done.

我将此添加到我的 entitlements.plist 中并完成了。

<key>aps-environment</key>
<string>production</string>

回答by Anderson Ferreira

I use "ionic package" and this work for me:

我使用“离子包”,这对我有用:

  1. Go to https://developer.apple.com/account/ios/identifier/bundle
  2. Edit "iOS App IDs" checking "Push Notifications"
  3. Go to https://developer.apple.com/account/ios/profile
  4. Regenerate and download app "iOS Provisioning Profiles"
  5. Resend ".mobileprovision" file to Certificates in ionic apps panel
  6. Work again "ionic package..." command
  1. 转到https://developer.apple.com/account/ios/identifier/bundle
  2. 编辑“iOS App IDs”检查“推送通知”
  3. 转到https://developer.apple.com/account/ios/profile
  4. 重新生成并下载应用程序“iOS Provisioning Profiles”
  5. 将“.mobileprovision”文件重新发送到离子应用程序面板中的证书
  6. 再次工作“离子包...”命令