Jul
14
2009

iPhone OS and Entitlements

I’ve been working on iIrssi, which is a project of mine to give irssi push notifications on the iPhone.

Unfortunately, even when following Apple’s instructions for getting push notifications going, I ran into this error:
Error in registration. Error: Error Domain=NSCocoaErrorDomain Code=3000 UserInfo=0x1402f0 "no valid 'aps-environment' entitlement string found for application

As it turns out, I needed to give myself an entitlement called ‘aps-environment’, whereas I’d assumed (and I’d found nothing on the internet to contradict it) that this was an internal part of the provisioning profile, since Apple recommended I created a new provisioning profile once I’d activated APN on my application in the development portal.

This document from Apple explains how to do this.

I’m sort of hoping this helps somebody in the same flummoxed position as I :)

tags: , , , ,
posted in Uncategorized by andrew

Follow comments via the RSS Feed | Leave a comment | Trackback URL

15 Comments to "iPhone OS and Entitlements"

  1. Omar wrote:

    What solved it for me was to actually completely delete the application from the iPhone, then install it again.

  2. Vinod wrote:

    I have the exact same problem. I checked the provisioning profile was using the correct AppID and created the .plist file but I’m still getting the error.

  3. Vinod wrote:

    I have found the problem. I had to issue a new provisioning profile after I edited the AppID, load this profile into the iPhone AND double click the .mobileprovision file so Xcode would build the app using the correct profile after manually selecting it in Project > Project Settings > Build

  4. Jon August wrote:

    Thanks for posting this. What do I need to set as the value for this key in the plist file?

  5. ilyashev wrote:

    thanks. this was helpful. though it seems like a workaround, since the aps-environment variable is present in the provisioning profile, as per apple’s explanation

  6. David wrote:

    What do I need to set as the value for this key in the plist file?

  7. aogufeixue wrote:

    thank you, i also have the probelm after i have uploaded my app to appstroe , so the user can’t receice push notifications,

    i still not clear about that ,should i add Entitlements.plist file to my projcet ?

  8. Alex wrote:

    I am having the same issue…push notifications not working properly. I am hoping I can fix it myself. Any assistance or guidence will be greatly appreciated. Cheers!

  9. Lakshmikanth wrote:

    I got the solution, when you have configured your AppID for Push notification, then recreate a new provisioning file with this AppID and install it on the Xcode Organiser, this has worked for me .

  10. Franck De Girolami wrote:

    I solved this issue by following all the steps outlined by Vinod AND by deleting all other provisioning profiles for this app on my Mac and on my iPhone.

  11. Walt Sellers wrote:

    I tried making up a whole new set of AppID, certificate and provisioning profile, and deleted old apps but still got this error.

    Finally I found the path to my code-signing had been cleared somehow. I reset it, and everything worked. The plist file contained only the entry for get-task-allow, which was on.

    Perhaps it needed to find my entitlements file to get the setting copied from the provisioning profile?

  12. Artin wrote:

    I was getting the same error while everything was fine. I just removed the application from my iPhone and installed it again. Now everything works.

  13. Noah wrote:

    Thanks for the post. FYI, I got the same error, and traced it back to a mismatch between my application name and the value in my App ID. When Apple asks for a “Bundle Identifier (App ID Suffix)”, and shows “com.domainname.appname”, make sure you use the same values as those in the xcode project.

  14. LEI Mobile wrote:

    Thanks! now our app will have push and soon be on the app store.

  15. Emanuel wrote:

    hey, i still got the problem and i think i have the same problem like “Wait Sellers”. i need to fix the path to my .plist file but i don’t really know how to do this. i’ve put my .plist file in the folder called “Recources”.
    What i need now is the “Code Signing Resource Rules Path” because this field is empty but should not be empty i guess?!

Leave Your Comment

 
Powered by Wordpress and MySQL. Theme by openark.org