我已經設置了我的應用程序接收來自解析發送推送通知,以下解析文檔中的所有步驟:解析PFAnalytics不跟蹤推打開
https://www.parse.com/docs/ios/guide#push-notifications
當我的移動設備上運行的應用程序會收到我從Parse發送給它的每個推送通知,但推送打開不會被跟蹤。這是我看到的儀表盤:
鑑於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
})
continuations塊確實被調用,但沒有一個asserts
失敗,因此PFAnalytics
被認爲已成功將數據發送給Parse Analytics。
爲什麼我的推開打開率仍然爲零?
並關閉而不提供任何解決方案:( – Luda