1

I'm trying to get Push Notifications to work in my app.

I started following this Ray Wenderlich tutorial and everything was fine except that it's for iOS6 and I'm working in iOS7.

Anyway, I enabled push notifications on the provisioning profile. I created the certificates, etc...

However, when I run the code ...

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];

I get the error...

Error registering for notifications Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x15dbb000 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}

I've had a look at the code signing and I just don't have a clue. The app is already on the app store so is 100% using the correct code signing. Except I keep getting this. I even tried refreshing the profiles through Xcode to get any updates.

If I try to change the code signing the app doesn't run telling me "No profiles found" or something.

Is there a step by step for iOS7 and Xcode 5 of how to get this working?

Fogmeister
  • 76,236
  • 42
  • 207
  • 306

1 Answers1

0

Well, it seems this is another Xcode "feature".

I closed the project and restarted Xcode and it started working.

I don't know why I bother with Xcode sometimes.

Thanks for answers anyway.

Fogmeister
  • 76,236
  • 42
  • 207
  • 306