[TIMOB-17510] iOS 8 - Add new notification permissions
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | None |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2014-09-13T04:09:01.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Pedro Enrique |
| Assignee | Pedro Enrique |
| Created | 2014-08-18T21:05:15.000+0000 |
| Updated | 2017-03-16T21:45:34.000+0000 |
Description
In iOS 8, there has been a change in the way the local notifications work. Now we need to ask the user for permission before registering.
Reference: https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIUserNotificationSettings_class/index.html
PR Pending: https://github.com/appcelerator/titanium_mobile/pull/5975
Ti.App.iOS.registerForLocalNotifications({ types: Ti.App.iOS.NOTIFICATION_TYPE_BADGE | Ti.App.iOS.NOTIFICATION_TYPE_SOUND | Ti.App.iOS.NOTIFICATION_TYPE_ALERT }); Ti.App.addEventListener('paused', function(){ Ti.App.iOS.scheduleLocalNotification({ alertBody: 'Hello!', alertAction: 'Here!' }); });Closing ticket as the issue has been fixed.