正在记录新的 Firebase 事件,但上传时显示没有数据

Ali*_*lix 2 firebase firebase-analytics

这是不言而喻的调试日志

2016-06-24 00:50:34.965 testApp[13184:] <FIRAnalytics/DEBUG> Event logged. Event name, event params: select_content, {
        "_o" = app;
        "content_type" = "Share_Screen";
        "item_id" = 4;
    }
2016-06-24 00:50:40.969 testApp[13184:] <FIRAnalytics/DEBUG> Event logged. Event name, event params: select_content, {
        "_o" = app;
        "content_type" = "About_Screen";
        "item_id" = 5;
    }
Run Code Online (Sandbox Code Playgroud)

为了简洁起见,我删去了许多其他事件。

2016-06-24 00:50:46.346 testApp[13184:] <FIRAnalytics/DEBUG> Do not schedule an upload task. Task already exists
2016-06-24 00:50:46.394 testApp[13184:] <FIRAnalytics/DEBUG> No data to upload. Upload task will not be scheduled
2016-06-24 00:50:46.394 testApp[13184:] <FIRAnalytics/DEBUG> Canceling active timer
2016-06-24 00:50:46.395 testApp[13184:] <FIRAnalytics/DEBUG> Cancelling background upload task.
Run Code Online (Sandbox Code Playgroud)

有谁知道这里发生了什么。我已经等待了一整天这些事件出现在 Firebase 分析中。

Sun*_*nly 5

我遇到了同样的问题,并且我已经尝试过两种可能的解决方案适用于我的案例。

  1. 在 GoogleService-Info.plist 中,启用标志“IS_ANALYTICS_ENABLED”
  2. 在模拟器或设备上进行测试时,我们需要在点击停止调试按钮之前将应用程序最小化到后台(以便它将数据发送到 Firebase 服务器)。