ios - 单击主屏幕中的应用程序图标时获取 IOS 解析有效负载数据

标签 ios iphone qt parse-platform

我正在 iOS 设备上解析推送消息。我能够集成整个推送功能并正常工作。我面临的唯一问题是,如何通过单击当设备收到推送通知时,主屏幕上的应用程序图标(当应用程序处于后台或非事件状态时)?

最佳答案

来自Apple Local and Remote Notification Programming Guide

If the app icon is clicked on a computer running OS X, the app calls the delegate’s applicationDidFinishLaunching: method in which the delegate can obtain the remote-notification payload. If the app icon is tapped on a device running iOS, the app calls the same method, but furnishes no information about the notification.

因此,总而言之,如果用户没有操作您的远程通知,您将无法获得推送消息的任何详细信息。

指南还说

Although you may define custom properties for the payload, you should never use the remote-notification mechanism for data transport because delivery of remote notifications is not guaranteed.

关于ios - 单击主屏幕中的应用程序图标时获取 IOS 解析有效负载数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28022964/

相关文章:

ios - 自定义字体不显示

ios - 我们如何在 3D 空间中同时旋转 2 个 UIView 平面

iOS 7通用后台UIViewController

c++ - 如何在 QxtApplication 中隐藏控制台窗口

ios - JSON 文件从服务器下载,文件加载了 8 次?

ios - SKPhysicsJoint 删除节点之间的连接线

iphone - 使用iPhone/Android手机写脚本有什么优缺点?

iphone - UItextview在iPhone应用程序中上下移动(当键盘出现和消失时)

c++ - 从 GridLayout 中删除单元格

c++ - QObject在删除时是否区分堆栈和堆分配的 child ?