I am doing something like this:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSApplication *application = [aNotification object];
NSRemoteNotificationType myTypes = NSRemoteNotificationTypeBadge;
[application registerForRemoteNotificationTypes:myTypes];
}
-(void)application:(NSApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{
NSLog(@"device token: %@", deviceToken);
}
-(void)application:(NSApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{
NSLog(@"ERROR: %@\nError object: %@", [error localizedDescription], error);
}
And I get the following error:
2014-06-14 20:47:13.656 RajamManagerStation[1878:303] ERROR: The operation couldn’t be completed. (OSStatus error 1.)
Error object: Error Domain=NSOSStatusErrorDomain Code=1 "The operation couldn’t be completed. (OSStatus error 1.)" (kCFHostErrorHostNotFound / kCFStreamErrorSOCKSSubDomainVersionCode / kCFStreamErrorSOCKS5BadResponseAddr / kCFStreamErrorDomainPOSIX / evtNotEnb / siInitSDTblErr / kUSBPending / dsBusError / kStatusIsError / kOTSerialSwOverRunErr / cdevResErr / EPERM: / Error code is the version of SOCKS which the server wishes to use / / POSIX errno; interpret using <sys/errno.h> / event not enabled at PostEvent / slot int dispatch table could not be initialized. / / bus error / / / Couldn't get a needed resource; alert / Operation not permitted)
I do not understand what I can do to fix this.
I watched an Apple WWDC video in 2011 regarding push notifications, and there was a slide that showed:

He tells me that if an error delegate callback is called, I have to check my access profile for rights.
I did my best to make it work, but I still get this error. What can I do to fix this?
UPDATE 1 . Just confirm that I have included push notification services in the list of allowed services.

UPDATE 2 . Confirmation that push notifications are in the provisioning profile
