Tuan B
Tuan B

Reputation: 41

Ionic iOS Cordova Push Token

I'm currently working on an Ionic project and using Cordova Push plugin for notifications. Currently the device is able to register a device token for GCM Android but it isn't apple to get a token for the Apple Iphone.

The way it works is the token would be sent to an API server where it will handle notification using the tokens.

I've checked the Push Notifications to ON in Xcode for Push Notifications entitlement, added cordova push, activated the push notifications on the Apple Developer which involved downloading the certificate from Apple Developer Console and applying it to the Keychain Access.

Am I missing any steps?

My code looks like:

cordovaPush.register(config).then(function(result) {
    console.log('###### RESPONSE #######')
    console.log(result);
}, function(err) {
    console.log(err);
});

$rootScope.$on('$cordovaPush:notificationReceived', function(event, notification) {
    console.log(notification);
});

Note: I've switched to PhoneGap Push Plugin. This might've solved the problem (haven't tested yet).

Anyone solved this problem?

Upvotes: 1

Views: 217

Answers (1)

Tuan B
Tuan B

Reputation: 41

Using PhoneGap Push Plugin solves this all. It seemed to be the library that was't working with the new iOS.

Upvotes: 0

Related Questions