None of the valid provisioning profiles allowed the specified entitlements:beta-reports-active,aps-environment

1、App在Archive时报如题所示错误:

屏幕快照-2016-08-15-上午9.26.56

2、首先找到问题的关键所在,这个问题的关键词是entitlements,这是个什么东西呢?在Build Settings—Code signing中有一项Code Signing Entitlements,这个属性值指向一个entitlements文件,这个文件一般长这个样子:

屏幕快照-2016-08-15-下午10.24.23

3、不知道从XCode几开始有这个文件的,关于该文件的说明,官方也做了详细的说明:About Entitlements

4、错误提示中有提到aps-environment说明与推送有关,所以重点看下Enable Push Notifications for Alerting the User

1
2
3
4
5
6
7
8
9
10
11
Push Notification Entitlement Keys
 
You set a value for the push notification entitlement by way of your development and distribution provisioning profiles, as described in Local and Remote Notification Programming Guide.
 
The following table shows the push notification entitlement keys that apply to the iOS and OS X platforms:
 
Notification entitlement key	Capability
aps-environment     Receive push notifications in iOS
com.apple.developer.aps-environment    Receive push notifications in OS X
 
The entitlement key is different for iOS than it is for OS X. On either platform, however, the provisioning portal assigns a value of development or production to the key, depending only on which activity you are creating the provisioning profile for.

刚好与错误提示中的aps-environment有关系,并且最后一段说了这个key有development和production这两个值,那就应该是调试与发布两种情况下的值咯?!

5、我做了一个小小的验证,如果我将该entitlements文件中的aps-environment这个键值对删掉,Archive是可以正常通过的,但App会不会有问题,苹果能否正常审核通过那就不一定了。此外,在发布时将aps-environment的值改成production时,Archive也正常通过了,太好了!研究了一天总算有了个结果,希望审核能顺利通过!

PS:网上搜索了很多相关的资料,没有正面回答或解决这个问题,在此分享给各位希望能有所价值。此外,有些说与Xcode8有关,确实我用Xcode8打开过项目,好像有种解决说Beta版的Xcode去Archive是会有问题,这个也值得注意。

None of the valid provisioning profiles allowed the specified entitlements:beta-reports-active,aps-environment》有8个想法

    1. Sian 文章作者

      这个值不应该影响Archive的,那你把这个键值对都删掉看能否正常Archive,或者改回去就可以了?不应该吧

发表回复