[AC-1526] registerForPushNotifications doesnt return any token
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2015-04-08T06:08:40.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | device, pushnotification, token |
Reporter | Ercan POLAT |
Assignee | Shuo Liang |
Created | 2014-11-18T13:55:38.000+0000 |
Updated | 2016-03-08T07:37:59.000+0000 |
Description
i run following codes on ios8 with sdk 3.4.1 RC and 3.4.1 GA but registering function doesnt enter any function (success , error , callback). It stay suspended and i cant take any reply.
Thanks for your help.
function registerForPush() {
Ti.Network.registerForPushNotifications({
success : function(e) {
ApplicationManager.DeviceToken = e.deviceToken;
args.callback(true);
},
error : function(e) {
ApplicationManager.ShowMessage(e.error);
args.callback(false);
},
callback : function(e) {
ApplicationManager.NOTIFI = e;
self.OpenNotification();
}
});
Ti.App.iOS.removeEventListener('usernotificationsettings', registerForPush);
};
Ti.App.iOS.registerUserNotificationSettings({
types : [Ti.App.iOS.USER_NOTIFICATION_TYPE_BADGE, Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT, Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND],
});
Ti.App.iOS.addEventListener('usernotificationsettings', registerForPush);
Yet another JIRA with this issue and yet another case where it looks like it wasn't solved. Seems to me we need to look at another platform if we want to use push notifications... sad I have spent years writing appcelerator apps to have to possibly move off it :(