Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
110 stars 139 forks source link

registerDevice onSuccess return is different on IOS/Android #114

Closed julestruong closed 8 years ago

julestruong commented 9 years ago

Hello,

From the documentation

on IOS :

pushNotification.registerDevice(
        function(status) {
            var deviceToken = status['deviceToken'];
            console.warn('registerDevice: ' + deviceToken);
        },
        function(status) {
            console.warn('failed to register : ' + JSON.stringify(status));
            alert(JSON.stringify(['failed to register ', status]));
        }
    );

on Android

pushNotification.registerDevice(
        function(status) {
            var pushToken = status;
            console.warn('push token: ' + pushToken);
        },
        function(status) {
            console.warn(JSON.stringify(['failed to register ', status]));
        }
    );

In Android the token is directly given while in IOS the token is within an Object.

May i ask why ?

DimanAM commented 8 years ago

Fixed in 6.0.0