IOS push notification markup stopped reaching device even though dashboard has entries about them

I use Parse for push notifications and it worked fine until a few days ago I stopped receiving notifications on my two iOS devices (one was running iOS 8.4 and the other was 8.2). I can see notifications sent to the Parse.com dashboard. But I don't see them arrive at the notification center on the device. Application.didReceiveRemoteNotification has not been called in the Xcode debugger. It's weird that my iPhone running iOS 7 still gets notifications with the same version of the code as iOS 8. So puzzled it could be a problem.

Over the past few days, what happened:

  • updated one of the phones to iOS 8.4 but notifications don't work on 8.2 device so the update shouldn't be the reason

  • update XCode to 6.4

  • 8.4 device was a new device (running on 8.3), I just added to provisioning profile. I ran into some problem (I don't remember the details) when I clicked the fix button in the Xcode Identity settings when I connected my phone to Xcode. Then after a while, I noticed that the notifications did not go through. I googled and found a suggestion to update the profiles profile in settings -> accounts-> apple ID-> view details-> refresh button. It seems to have worked at the moment and I was getting notifications again. But a day later, it stopped working again.

  • I tried to create a separate version of the app using a different bundle id (with some suffix) and using the same facebook app id, adding another url scheme to the info.plist file. Couldn't get it to work as facebook login allows me to return to my old app, so I didn't do all the work. But I can still see some new provisioning profiles with a new bundle ID. So I removed them in the member center of the Apple developer site and updated the profiles in Xcode to get the changes.

These are all I can remember and I have no idea what action, if any, caused the problem and how to fix it. Any suggestions?

+3


source to share


1 answer


Have you confirmed that push for iOS 8 is included in the app delegate?

  // Register for Push Notitications, if running iOS 8
  if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
    UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert |
                                                    UIUserNotificationTypeBadge |
                                                    UIUserNotificationTypeSound);
    UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes
                                                                             categories:nil];
    [application registerUserNotificationSettings:settings];
    [application registerForRemoteNotifications];
  }
  else {
    // Register for Push Notifications before iOS 8
    [application registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge |
                                                     UIUserNotificationTypeAlert |
                                                     UIUserNotificationTypeSound)];
  }

      



I would also start a brand new and fresh one with generating all the certificates, applications and provisioning profiles, and the .p12 files - sounds like something isn't working, but its a needle in a haystack. Do your due diligence and follow the process from A to Z:

https://parse.com/tutorials/ios-push-notifications

+1


source







All Articles