3

iOS 10 introduced a new extension: notification content extension. When I play with it, I found a bug.

In the new protocol: UNNotificationContentExtension, the callback method - (void)didReceiveNotification:(UNNotification *)notification; will be called when there is a new notification from same conversation, per to Apple's comment in the header file:

This will be called to send the notification to be displayed by the extension. If the extension is being displayed and more related notifications arrive (eg. more messages for the same conversation) the same method will be called for each new notification.

I found out that this is true when the device is unlocked and I opened extension by 3D tapping notification bubble/banner. But when I open the extension if the device is locked, or open the extension from pull down notification enter, I can not get the callback been called if I have new notification. This is totally broken API, if I open the extension, and new notification comes in, I can not get called.

Any thoughts?

Yong Li
  • 266
  • 1
  • 7

0 Answers0