Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23527] iOS10: Support the UserNotifications framework

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-05-23T08:18:32.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.3.0
ComponentsiOS
Labelsdemo_app, ios10
ReporterHans Knöchel
AssigneeHans Knöchel
Created2016-06-14T23:50:40.000+0000
Updated2018-08-06T17:57:27.000+0000

Description

iOS 10 offers a way to setup interactive notifications by using the UserNotifications framework. We can configure notifications (UNNotification), define notification actions (UNNotificationAction), create notification content (UNNotificationContent), add an attachment to a notification (UNNotificationAttachment) and group them into categories (UNNotificationCategory). In addition, we can also trigger notifications (UNNotificationTrigger) and manage notifications in the notification center (UNUserNotificationCenter). While some of it could be migrated to the existing ones, we should think about a new interface that manages those notifications properly.

Attachments

FileDateSize
local_notifications.js2018-03-23T02:05:42.000+00003739
remote_notifications.js2018-03-23T04:06:34.000+00003910
silent_push.js2018-03-23T03:31:26.000+00002319

Comments

  1. Hans Knöchel 2016-06-20

    Ok, current status: I am trying to map the new API's to our existing API's as good as possible. That means, the Ti.App.iOS.scheduleLocalNotification will be the same as before, but calls the iOS 10 API's when using iOS 10. In addition, the Ti.App.iOS.NotificationCategory will use UNNotificationCategory and it's notification actions defined in Ti.App.iOS.NotificationAction will use UNNotificationAction. In addition to that, I would like to introduce the new Ti.App.iOS.NotificationCenter namespace, that could be used to schedule notification in both iOS < 10 and iOS 10, but also to control scheduled notifications etc. in iOS 10, since it exposes great utilities for that. Feedback greatly appreciated. A work-in-progress PR will come later today.
  2. Hans Knöchel 2016-07-18

    PR (work in progress): https://github.com/appcelerator/titanium_mobile/pull/8078 I am trying to migrate everything that is available in iOS < 10. I am rewriting the whole notifications for iOS 10 and later having the same API-interface. In addition, certain properties like subtitle and attachments are integrated in existing API's for iOS 10. Some new features coming with the UNUserNotificationCenter will be integrated on the Ti.App.iOS namespace for now. Maybe we should consider introducing a Ti.App.iOS.NotificationCenter to make the public interface more structured and keep the internal code-base clean. //cc [~bgrantges@appcelerator.com] [~cng] [~ingo] *EDIT*: The plan is to finish the implementation by end of the week, add the docs until next Tuesday and keep it reviewed until next Friday. That should match the 6.0 code-freeze pretty good. But be aware that I currently use iOS 10 Beta 2, so there might be native interface changes that need to be validated before GA. I guess thats fine.
  3. Chee Kiat Ng 2016-07-19

    That's fine. I'm all for introducing a Ti.App.iOS.NotificationCenter even though i rather prefer a parity API but, at this point we can consider parity at a later stage.
  4. Hans Knöchel 2016-07-27

    Moving to 6.1.0, since the changes need way more testing then we have left for 6.0.0. Since we will be able to support both the old and the new notifications, that will be the proper way to go. The core-implementation is finished and parity-adjustments will be done over the next weeks.
  5. Hans Knöchel 2016-09-28

    Attached the first test-cases. One biggy is missing, the silent-push-notifications. I will setup a test-case and server-environment for that one as well. What we need to properly test this: - iOS 9 and 10 device - Titanium SDK 5.4.0.GA and Titanium master (once merged) - Real apps to test with (any cooperating partners / customers?) - A matrix of the results ([~htbryant] is good in those) I will submit the PR to review next in early October, after all my internal tests have succeeded.
  6. Tobias Høegh 2017-02-10

    Hans Knøchel, You asked for real app cooperating to test with. I could contribute with "real apps" testing. My app is this one: http://MoogliApp.com
  7. Hans Knöchel 2017-03-12

    Hey Tobias, thanks for that! As we want to move forward with 6.1.0 over the next weeks, I've put it out of 6.1.0 for now, since it requires major testing, so we won't break any push-related apps. Anyway, I would still love to give you a build if you want, so we can work on your specific test-cases together. Feel free to send me an email with further infos, thx!
  8. Hans Knöchel 2018-05-14

    [~vijaysingh] Ready for review!
  9. Hans Knöchel 2018-05-23

    Hey everyone! The pull request just landed in the core on master. Try it out today to ensure your specific use-cases are still working as before and make use of the new features like notification attachments! Install: appc ti sdk install -b master. Thanks!
  10. Eric Merriman 2018-08-06

    Cleaning up older fixed tickets from 2016 and earlier. If this ticket should not have been closed, please reopen it.

JSON Source