didRegisterForRemoteNotificationsWithDeviceToken never called on certain devices

I have an app that has supported push notifications for years. Recently a couple of users have noticed push messages not coming through and troubleshooting this issue has been very difficult. I also have a coworker with this issue, so I have been able to test with his device a bit.


One of my users with this trouble does not see my app listed under Settings > Notifications at all. The other users do see my app listed and notifications are allowed. My iPhone as well as others I have been able to test with are receiving push notifications with no trouble.

I tested using my coworker's iPhone (running iOS 8.4) today and discovered that although [[UIApplication sharedApplication] registerForRemoteNotifications] is called, neither application:didRegisterForRemoteNotificationsWithDeviceToken: or application:didFailToRegisterForRemoteNotificationsWithError: are ever called. Apple's push troubleshooting doc (https://developer.apple.com/library/ios/technotes/tn2265/_index.html) only mentions this can happen when the device can't connect to the internet. This is definitely not the case on this device.


My certificates and provisioning profiles are valid. I haven't touched this area of the code recently, so I am at a loss for what could be causing this issue. Any guidance would be appreciated.

I am having this issue too!!!


It's only for certain devices but on the one that I can reproduce none of the notification delegates ever gets called back. I did the following to register


UIUserNotificationSettings *mySettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil];
        [[UIApplication sharedApplication] registerUserNotificationSettings:mySettings];
      
        NSLog(@"About to register for notification");
      
        [[UIApplication sharedApplication] registerForRemoteNotifications];


I get nothing at all! Not even an error! It's so strange

I created issue 22568424.


I suspect it happens when someone disable notification for the app on settings and re-enable after a long time. But i'm not entirely sure...

Same exact problem here. Neither of the delegate methods get called, even though the user has push notifications enabled in Settings and registration is done correctly *for sure*.

didRegisterForRemoteNotificationsWithDeviceToken never called on certain devices
 
 
Q