如何修复"没有有效的“APS-环境”的权利找到了应用和QUOT串;以x code 4.3? [英] How to fix "no valid 'aps-environment' entitlement string found for application" in Xcode 4.3?

查看:115
本文介绍了如何修复"没有有效的“APS-环境”的权利找到了应用和QUOT串;以x code 4.3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直非常非常努力创建一个简单的简单的iOS应用可以收到推送通知。我这样做的唯一原因是要建立一些其他团队成员使用的过程,一直没能找到一个最新的,其他地方在网络上工作的指示等版本。我们的店是相当新的到iOS开发,我个人与iOS开发和X code完全没有经验。我已经通过数万教程,文章和麻烦来自苹果的职位和其他地方的迷迷糊糊,我觉得我可能是近那里......

I've been trying very very hard to create a simple simple iOS app which can recieve push notifications. My only reason for doing this is to establish a procedure for some other team members to use, and have not been able to find an up to date, working version of such instructions elsewhere on the web. Our shop is fairly new to iOS dev, I personally am completely inexperienced with iOS dev and Xcode. I've stumbled through tens of tutorials, articles, and trouble posts from Apple and elsewhere and I feel like I might be nearly there...

下面是我得(请注意,我用X code 4.3,并试图开始部署只是到iOS 5.1,而据我了解,有些东西可能已经VS早期版本的X $的C最近更改$ C,但我又是新来的这一切 - 并发现它完全混乱和令人费解):

Here is where I've got to (note I'm using Xcode 4.3 and trying initially to deploy just to iOS 5.1, and I gather that some things may have changed recently vs earlier versions of Xcode, but again I'm new to all this -- and finding it completely confusing and convoluted):

1)我有已启用推送在我的iPhone供应配置文件

1) I've got a provisioning profile on my iPhone which has Push enabled

2)在我的测试X code ++项目我已经得到了供应选为签署身份(在构建设置配置文件> code签署)

2) In my test Xcode project I've got that provisioning profile selected as the signing identity (in Build Settings > Code Signing)

3)我有我的包标识下总结和信息>自定义的iOS终端的属性设置不当*(我想?)

3) I've got my bundle identifier under Summary and Info > Custom iOS Target Properties set properly* (I think??)

4)我有被称为在我委托的didFinishLaunchingWithOptions registerForRemoteNotificationTypes

4) I've got registerForRemoteNotificationTypes being called in my delegate's didFinishLaunchingWithOptions

5)我有didRegisterForRemoteNotificationsWithDeviceToken和didFailToRegisterForRemoteNotificationsWithError在我的委托,成立了分别登录设备令牌或错误

5) I've got didRegisterForRemoteNotificationsWithDeviceToken and didFailToRegisterForRemoteNotificationsWithError in my delegate, set up to log the device token or error respectively

6)我有权利使能总结下检查。

6) I've got Enable Entitlements checked under Summary.

7)的正下方所选择的权利文件是Tinker6(当我检查启用权利而自动生成的我的测试项目)的名称

7) Right below that the Entitlements File selected is Tinker6 (the name of my test project), which was generated automatically when I checked Enable Entitlements

8)在Tinker6.entitlements文件我已经得到了以下的(我已经收集正确基于几个不同的岗位遍布网络,但我无法从苹果本身),找到任何明确的:

8) In the Tinker6.entitlements file I've got the following (which I've gathered is correct based on several different posts all over the web, but which I can't find anything definitive from Apple itself on):

更新

9)另外,我已经试过了整个事情没有权利的文件,并获得基本相同的结果。

9) Also, I have tried the whole thing without an entitlements file, and get essentially the same result.

10)我的mobileprovision文件,内容包括权益正确(我炒的数量和域,但在结构上是相同的):

10) My mobileprovision file contents include entitlements properly (I've scrambled the number and domain but structurally the same):

<key>application-identifier</key>
<string>12355456A7.com.whatever.tinker</string>
<key>aps-environment</key>
<string>development</string>
<key>get-task-allow</key>
<true/>
<key>keychain-access-groups</key>
<array>
    <string>12355456A7.*</string>
</array>

/结束更新

当我尝试我的设备上运行,我得到的X code输出以下错误:

When I attempt to run this on my device, I get the following error in Xcode output:

2012-06-11 12:45:23.762 Tinker6[13332:707] Failed to get token, error: 
Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' 
entitlement string found for application" UserInfo=0x24a3b0 
{NSLocalizedDescription=no valid 'aps-environment' entitlement string 
found for application}

我试过设置获得任务,允许NO,APS-环境到生产,全部四种可能的组合,同样的事情。

I've tried setting get-task-allow to NO, aps-environment to production, all four possible combinations, same thing.

我怎样才能突破这个?哪里是最终文件上呢?

How can I get past this? Where is definitive documentation on this?

- 进一步的背景如下的 -

*至于包ID,我还没有就如何实现这一有关应用程序ID和个人资料的ID在部署配置文件中设定明确的。在根据应用ID资源调配门户我有这样的(同样,炒的数量和域):

*As far as the bundle id, I am still not clear on how this should be set in relation to App Ids and Profile ids in the Provisioning profile. In the Provisioning portal under App Ids I have this (again, scrambled the number and domain):

和两地包ID设为我有这样的:

And the two places bundle id is set I have this:


我不敢肯定这些都是正确的,还是一方或双方应设置为12355456A7.com.whatever.tinker,虽然我已经试过在这个过程中这些早期没有成功...

I am not at all sure these are correct or whether one or both should be set to 12355456A7.com.whatever.tinker, though I've tried those earlier in the process with no success...

注意我知道有类似的头衔很多帖子,但他们似乎都基于给定的文件名和问题等等是过时的,和解决方案的事实,没有人可以是有用的。我希望细节我已经给会保证质量响应的更高水平。我可能会尽快分配赏金越好,如果你给一个高品质的答案,导致一个解决方案,我将授予你赏金以及通过Twitter和我的博客推广你的答案。特别是如果你crosspost发布一个真正的好这里是的确切的500步,你需要得到一个简单的推送通知的应用程序的工作,包括提供和其他任何文章你的博客或什么的。

Note I realize there are many posts with similar titles, however they all seem to be out of date based on the file names and so-forth given, and the fact none of the solutions seem to be useful. I'm hoping the greater level of detail I've given will warrant a quality response. I will probably assign a bounty as soon as possible and if you give a high quality answer that leads to a solution I will award you the bounty as well as promote your answer via twitter and my blog. Especially if you crosspost post a really good "here are the exact 500 steps you need to get a simple push notification app working including provisioning and whatever else" article on your blog or whatever.

推荐答案

答案是:从头再来,千方百计相同,但创建一个新的供应配置文件,并进行安装。这工作。检查所有的细节(移动规定的权利)看起来的究竟的相同,在这里我的问题一切。但现在它的作品。苹果:WAT

The answer was: start over, do everything the same but create a new provisioning profile, and install it. That worked. Inspecting all the details (entitlements in mobile provision) looks exactly the same as everything in my question here. But now it works. Apple: WAT?

当然,这本来是很明显这样做的如果的有可能删除预置描述文件。但是,因为这是不可能的,我不想扰乱我们的团队和一群测试配置文件。尽管如此,终于失去了耐心,试了一下,无论如何,它结束了工作。 Whatevs。

Of course, it would have been obvious to do this if it was possible to delete provisioning profiles. But since that's not possible, I didn't want to clutter our team with a bunch of test profiles. Still, finally lost patience and tried it anyway, and it ended up working. Whatevs.

这篇关于如何修复&QUOT;没有有效的“APS-环境”的权利找到了应用和QUOT串;以x code 4.3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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