本地通知的通知服务扩展 [英] Notification service extension for Local notification
问题描述
系统是否会加载Notification Service扩展并在iOS 10中调用其didReceive(_:withContentHandler:)
进行本地通知?
如果是,我们该怎么做?
will system loads Notification service extension and calls its didReceive(_:withContentHandler:)
for local notifications in iOS 10?
If yes how we can do that?
推荐答案
否.可接受的答案描述了Notification Content 扩展,这些扩展使您可以在扩展的通知视图中显示ViewController,并且可以同时使用远程和本地通知.
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.
Notifications Service 扩展名,使您可以更改通知的内容(附加图像等),不不适用于本地通知.但是,您可以在过程中附加图像以显示本地通知.
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.
这篇关于本地通知的通知服务扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!