Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TC-4654 : iOS 8 : Add isRegisteredForRemoteNotifications to determine whether the app is currently registered for remote notifications. #6018

Closed
wants to merge 1 commit into from

Conversation

benbahrenburg
Copy link
Contributor

Returns a Boolean indicating whether the app is currently registered for remote 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");
}

… 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");
}
@benbahrenburg benbahrenburg changed the title TC-4654 : iOS 8 : Add isRegisteredForRemoteNotifications to determine if... TC-4654 : iOS 8 : Add isRegisteredForRemoteNotifications to determine whether the app is currently registered for remote notifications. Sep 6, 2014
@hansemannn hansemannn closed this Oct 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants