[TIMOB-17640] iOS8: Add isRegisteredForRemoteNotifications to determine whether the app is currently registered for remote notifications.
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-09-15T16:11:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.4.0, Release 3.5.0 |
Components | iOS |
Labels | ios8 |
Reporter | Ben Bahrenburg |
Assignee | Jon Alter |
Created | 2014-09-03T23:34:06.000+0000 |
Updated | 2014-11-21T20:30:20.000+0000 |
Description
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");
}
Added pull request https://github.com/appcelerator/titanium_mobile/pull/6018 Ingo mentioned AppC is now taking iOS8 PR. This ticket was created in associated with PR 6018.
[~mpmiranda], for iOS 8 tickets, add a label of "ios8" and make sure the summary _starts_ with iOS8 (no spaces)
Jon, could you please take a look?
PR master: https://github.com/appcelerator/titanium_mobile/pull/6046 PR 3_4_X: https://github.com/appcelerator/titanium_mobile/pull/6047 This ticket will resolve TIMOB-17647 please resolve it when these PRs are merged.
Test Code:
All, please see TIMOB-17683 as well. Thoughts appreciated.
PR's merged