捆绑包标识符和推送证书... aps环境授权错误 [英] Bundle Identifier and push certificate... aps-environment entitlement error

查看:238
本文介绍了捆绑包标识符和推送证书... aps环境授权错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读 xcode从何处获取应用程序的标识符?来自{PRODUCT_NAME} 的XCode捆绑包标识符格式,并加载更多但是...

我正在尝试获取推送通知并获得可怕的

错误域= NSCocoaErrorDomain代码= 3000"没有有效的'aps-environment' 找到应用程序的授权字符串" UserInfo = 0x15b200 {NSLocalizedDescription =没有有效的"aps-environment"权利字符串 找到了应用}}".

我可以肯定我正确地遵循了所有步骤,包括:

  • 在预配证书之前就制作了推送证书
  • 制作了一个"Entitlements.plist"
  • 添加了一个get-task-allow布尔值并将其设置为true(临时发行版)

我唯一不能完全理解的是Bundle Identifier

推送证书用于

XXXXXXXXXX.com.julianbaker.pwcnewsuk

PwCNewUK-Info.plist中的捆绑包标识符用于

com.julianbaker.${PRODUCT_NAME:rfc1034identifier}

如果我手动将其更改为

com.julianbaker.pwcnewsuk

该应用程序被视为PwCNewsUK时,我收到UDID不匹配错误

当我用Google搜索这个问题时,似乎对此事有些困惑,但是似乎他们必须匹配?

问题:

Bundle Indentifer应该与
的推送证书相匹配 XXXXXXXXXX.com.julianbaker.pwcnewsuk吗?

问题:

我是否需要在配置文件中添加"aps-environment"权利,如果需要,在何处以及如何使用? (请参见 http://www.airplaysdk.com/node/3174 等) >

热爱iPhone开发,但有时可能会成为危险!

解决方案

在我正在开发的应用程序上从开发环境转移到生产环境时,我发现了这个问题.此过程涉及创建新的配置文件,新的应用程序ID等.我创建了应用程序ID和配置文件,但Team Agent必须配置推送通知.当我尝试使用新的配置文件继续测试时(在为推送通知配置了应用程序之后),我遇到了找不到适用于应用程序的有效'aps-environment'权利字符串"的问题.然后,我想起了阅读文档中的一些警告:

您必须以某种方式(例如,切换选项)修改门户网站的配置文件,以生成新的配置文件.如果该配置文件不是那么脏",那么您将获得没有配置文件的配置文件.推送权利."

来源:

I've read Where does xcode take application's Identifier from? , XCode bundle identifier formatting from {PRODUCT_NAME} , and loads more but...

I'm trying to get push notifications going and getting the dreaded

"Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x15b200 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}" error.

I'm fairly certain I've followed all the steps correctly, including:

  • made the push certificate well in advance of the provisioning cert
  • made a 'Entitlements.plist'
  • added a get-task-allow boolean and set it to true (ad-hoc release)

The only think I can't quite get my head around is the Bundle Identifier

The push certificate is for

XXXXXXXXXX.com.julianbaker.pwcnewsuk

The Bundle Indentifier in PwCNewUK-Info.plist is for

com.julianbaker.${PRODUCT_NAME:rfc1034identifier}

If I manually change it to

com.julianbaker.pwcnewsuk

I get a UDID mismatch error as the app is seen as PwCNewsUK

When I've Googled this there seems to be some confusion over the matter, but it seems they have to match?

QUESTION:

What should the Bundle Indentifer be to match the push certificate of
XXXXXXXXXX.com.julianbaker.pwcnewsuk ?

QUESTION:

Do I need to add a "aps-environment" entitlement to the provisioning profile, and if so where and how? (See http://www.airplaysdk.com/node/3174 amongst others)

Loving iPhone development but sheesh it can be a headbanger at times!

解决方案

I found this question when I was moving from a development environment to a production one on an application that I am working on. This process involved the creation of a new profile, a new app ID, etc. I created the app ID and a profile, but the Team Agent had to configure the push notifications. I ran into the problem of "no valid 'aps-environment' entitlement string found for application" when I tried to resume testing with the new profile (after the app had been configured for push notifications). I then remembered reading a little caveat in the documentation:

"You have to modify the profile in some way (for example, toggle an option) for the portal to generate a new provisioning profile. If the profile isn't so "dirtied", you're given the profile without the push entitlements."

Source: Local and Push Notification Programming Guide

For me, "dirtying" the provisioning profile and reinstalling it was all that was needed to fix the issue. Per the documentation, this was required because the provisioning profile was created before the app was configured for push notifications. This may or may not help anyone, but this probably explains (and eliminates) the need to manually add anything to the provisioning profile.

这篇关于捆绑包标识符和推送证书... aps环境授权错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆