0
votes

After over a year of no problems with PushSharp, our iOS app users suddenly do not receive any push notifications anymore. The app and APN certificates are still valid and nothing has been changed on our server side.

To be sure I created a new APN production certificate and uploaded it to our push server which did not help.

Additionally, I have tested two independant push notification tester apps from the Mac OS X store (they let you add your certificate, token and payload) and tried to send myself push messages from there. All attempts result with the response: "Payload has been pushed", "Push message sent".

My iPhone refuses to receive any push notifications and all my other devices as well. I have no idea what went wrong or how I can debug this issue as my server does not retrieve any error from the Apple Push Notification Server. It always looks like the messages have been sent to Apple, but Apple does not seem to send them to the user's devices.

How is that possible? What could have happened?

2

2 Answers

1
votes

It could be because, as of iOS 8, Apple has changed the way push notifications are registered in your app. The new way is:

    if([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)]) {
        [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
       [[UIApplication sharedApplication] registerForRemoteNotifications];
    }
    else {
        [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
         (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
    }