Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (device)
Viewing all articles
Browse latest Browse all 250

how to get device token for ios

0
0

How to get the device token for pushnotification in titanium.

I try this,

Titanium.Network.registerForPushNotifications({
 
        types: [
            Titanium.Network.NOTIFICATION_TYPE_BADGE,
            Titanium.Network.NOTIFICATION_TYPE_ALERT,
            Titanium.Network.NOTIFICATION_TYPE_SOUND
        ],
        success:function(e) {
            var deviceToken = e.deviceToken;
            Ti.App.Properties.setString('token',deviceToken);
            Ti.API.info("Push notification device token is: "+deviceToken);
            Ti.API.info("Push notification types: "+Titanium.Network.remoteNotificationTypes);
            Ti.API.info("Push notification enabled: "+Titanium.Network.remoteNotificationsEnabled);
        },
        error:function(e) {
            alert("Error during registration: "+e.error);
        },
It's not even call any success funtion or error function for registerforpushnotification method.

Can any on advice me how to fix the issue

Thanks in advance.


Viewing all articles
Browse latest Browse all 250

Latest Images

Trending Articles





Latest Images