Apple 针对用户响应的推送通知服务
当消息被推送到用户设备时,有没有办法跟踪用户响应(“查看”和“关闭”之间的选择)?
谢谢。
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?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果用户单击“关闭”,您的应用程序不会收到通知;但是如果用户单击“查看”,您的应用程序将启动,并且您可以检测到它是从通知启动的 - 通知的有效负载将传递到 application:didFinishLaunchingWithOptions:。
另外,不要忘记通知到来时您的应用程序可能已经在运行的情况。在这种情况下,您的 application:didReceiveRemoteNotification: 函数将被调用。
完整详细信息位于此处。
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:.
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.
Full details are here.
我的策略是:
My strategy would be: