针对用户响应的 Apple 推送通知服务 [英] Apple Push Notification Service on user response

查看:34
本文介绍了针对用户响应的 Apple 推送通知服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当消息被推送到用户设备时,有没有办法跟踪用户响应(在查看"和关闭"之间的选择)?

谢谢.

解决方案

如果用户点击关闭",你的应用不会收到通知;但是如果用户点击查看",你的应用程序就会启动,你可以检测到它是从通知中启动的——通知的有效负载被传递给 application:didFinishLaunchingWithOptions:.>

另外,不要忘记当通知出现时您的应用程序可能已经在运行的情况.在这种情况下,您的 application:didReceiveRemoteNotification: 函数将被调用.

完整详情在这里.

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.

解决方案

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.

这篇关于针对用户响应的 Apple 推送通知服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆