问题描述
有没有办法来跟踪用户的响应时,该消息已推到用户设备(关闭查看之间选择)?
Is there a way to track user response (the choice between the 'View' and 'Close') when the message has been push into the user device?
感谢您。
推荐答案
您的应用程序是不是如果用户点击关闭通知;但是,如果用户点击查看,您的应用程序被启动,则可以检测到它是从一个通知推出 - 通知的有效载荷传递给应用程序中:didFinishLaunchingWithOptions:
Your app is not notified if the user clicks "Close"; but if the user clicks "View", your app is launched, and you can detect that it was launched from a notification -- the notification's payload is passed to application:didFinishLaunchingWithOptions:.
另外,不要忘记在您的应用程序可能已经在通知中来运行的情况。在这种情况下,你的应用程序:didReceiveRemoteNotification:功能被称为
Also, don't forget about the case where your app might already be running when the notification comes in. In that case, your application:didReceiveRemoteNotification: function will be called.
全部细节这里。
这篇关于用户响应苹果推送通知服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!