解析PFAnalytics不跟踪推送打开

时间:2015-09-03 17:41:58

标签: ios swift parse-platform

我按照Parse文档中的所有步骤设置我的应用程序以接收从Parse发送的推送通知:

https://www.parse.com/docs/ios/guide#push-notifications

在我的移动设备上运行时,应用程序会收到我从Parse发送给它的每个推送通知,但不会跟踪推送打开。这就是我在仪表板上看到的内容:

enter image description here

鉴于PFAnalytics.trackAppOpenedWithLaunchOptions and PFAnalytics.trackAppOpenedWithRemoteNotificationPayload返回了他们各自的BFTasks,我为他们添加了一个完成块,如下所示:

application:didReceiveRemoteNotification

PFAnalytics.trackAppOpenedWithRemoteNotificationPayload(userInfo).continueWithBlock({ (task) -> AnyObject! in

    assert(task.completed, "task should have completed")

    assert(!task.cancelled, "task should not have been cancelled")

    assert(!task.faulted, "task should not complete due to error or exception")

    return task
})

application:didFinishLaunchingWithOptions

PFAnalytics.trackAppOpenedWithLaunchOptions(launchOptions).continueWithBlock({ (task) -> AnyObject! in

    assert(task.completed, "task should have completed")

    assert(!task.cancelled, "task should not have been cancelled")

    assert(!task.faulted, "task should not complete due to error or exception")

    return task
})

会调用continuation块,但asserts都没有失败,因此PFAnalytics可能会成功将数据发送到Parse Analytics。

为什么我的推送打开且开放率仍为零?

1 个答案:

答案 0 :(得分:0)

我已经意识到,如果您在“分析”部分中查找“推送打开”事件,则可以跟踪推送打开,但是没有关于单个推送活动的信息,这使得A / B测试目前完全没用。