appcelerator/titanium_mobile — pull request #6018 by benbahrenburg (2014-09-04 16:14:23+00:00)
Title: TC-4654 : iOS 8 : Add isRegisteredForRemoteNotifications to determine if...

... Registered for Notifications

Add support for isRegisteredForRemoteNotifications so that the developer can check if the user has authorized notifications.

var hasAuthorized = Ti.App.iOS.isRegisteredForRemoteNotifications();
if(hasAuthorized){
Ti.API.info("User has already authorized");
}else{
Ti.API.info("User needs to authorize, maybe ask them before the iOS rights dialog pops up");
}