As I said in the header of this thread, I had a problem with a push notification about my application. There are 2 cases: When the application asks you if you want to click a notification and you click OK, it works fine.
This function:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken
called when registerForRemoteNotificationTypes is called:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
...
}
But when you select NO at the beginning, and then you change your settings to accept a push notification, do not add anything and this function didRegisterForRemoteNotificationsWithDeviceToken is never called.
Please help me, I'm losing my mind!
source
share