代表“查看”用于推送通知 [英] Delegate for "View" for Push Notification
问题描述
当我们点击推送通知提醒的查看按钮时,是否有任何代理被调用。这是应用程式无效时。
Is there any delegate which gets called when we tap on the "View" button of Push Notification alert. This is when App is inactive.
推荐答案
是的。它是应用程序:didFinishLaunchingWithOptions:
。从Apple文档:
Yes there is. It is application:didFinishLaunchingWithOptions:
. From the Apple docs:
如果操作按钮被点击,
系统启动应用程序,
应用程序调用其委托的
应用程序:didFinishLaunchingWithOptions:
方法(如果实现);它传递
通知有效载荷(对于远程
通知)或
本地通知对象(对于本地
通知)。如果应用程序
图标被点击,应用程序调用
同样的方法,但不提供
关于通知的信息。
If the action button is tapped, the system launches the application and the application calls its delegate’s application:didFinishLaunchingWithOptions: method (if implemented); it passes in the notification payload (for remote notifications) or the local-notification object (for local notifications). If the application icon is tapped, the application calls the same method, but furnishes no information about the notification.
以下是参考:本地通知和推送通知编程指南查看处理本地和远程通知部分。
Here is the reference: Local and Push Notification Programming Guide Look at the Handling Local and Remote Notifications section.
这篇关于代表“查看”用于推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!