Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notification service extension for Local notification

will system loads Notification service extension and calls its didReceive(_:withContentHandler:) for local notifications in iOS 10? If yes how we can do that?

like image 695
Vinu David Jose Avatar asked Dec 29 '16 11:12

Vinu David Jose


2 Answers

No. The accepted answer describes Notification Content Extensions, which allow you to present a ViewController in the expanded notification view, and works with both remote and local notification.

Notification Service Extensions, that let you change the content of the notification (attaching images, etc) do not work with local notifications. However, you can attach images as part of the process to show a local notification.

like image 171
Alastair Avatar answered Oct 05 '22 22:10

Alastair


Notification Service extension is for remote notification not for local notification.

As per apple doc

UNNotificationServiceExtension An object that modifies the content of a remote notification before it's delivered to the user.

like image 44
Learner Avatar answered Oct 05 '22 23:10

Learner