2

I'm developing an app for iOS platform with Cordova (and Intel XDK). I'm using this plugin for push notifications with Parse platform: https://github.com/cranberrygame/cordova-plugin-pushnotification-parse

The device is registered to Parse properly, but the deviceToken is undefined, so when I send push notifications, nobody receives it.

enter image description here

I don't understand Objective-C very much but I know in this plugin's method, the device is sending the token to Parse, but it seems like it is never called:

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)newDeviceToken
{
        // Call existing method
        [self swizzled_application:application didRegisterForRemoteNotificationsWithDeviceToken:newDeviceToken];
        // Store the deviceToken in the current installation and save it to Parse.
        PFInstallation *currentInstallation = [PFInstallation currentInstallation];
        [currentInstallation setDeviceTokenFromData:deviceToken];
        [currentInstallation saveInBackground];
    }

Notifications are enabled in the iPhone for my app and I'm using iOS 8.

How can I do? Thanks in advance.

Héctor
  • 24,444
  • 35
  • 132
  • 243

1 Answers1

0

I was also facing the same problem.

So the channel where you saw the sample code has been registered. https://github.com/ParsePlatform/PushTutorial/blob/master/iOS/PushNotificationTutorial/AppDelegate.m#L39

And the method was successful. I wonder if I channel is required to register ?