【发布时间】:2018-04-19 17:42:43
【问题描述】:
我编写了一个使用 Firebase 的应用。我相信我已经正确安装了它,并且我已经在- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 中完成了[FIRApp configure];
我还为项目方案添加了调试参数,以查看发生了什么。 Firebase 似乎按预期工作,只是它一直告诉我 Firebase 分析已禁用。
我在 Xcode 中的登录:
Firebase screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
Configuring the default app.
InstanceID library version 2.0.5
Debug mode is on
Firebase Analytics v.40004000 started
Firebase Analytics disabled
Tracking view controller. Class, ID: MainViewController
Screen view event not logged. App is not active.
Firebase Analytics is disabled. Event not logged
所以 Firebase 显然可以工作,但它不会让我发送任何自定义或其他事件。我找不到其他有这个问题的人。我相信我的项目在 console.firebase.com 中设置正确,但它根本不会在那里发送任何数据。我已经下载并添加了我的GoogleServices-Info.plist 文件。我的应用面向 iOS9 及更高版本,我使用的是 Objective-C。
我已遵循本指南:https://firebase.google.com/docs/ios/setup#add_firebase_to_your_app
编辑
在 Firebase 存在之前,我的项目很旧。所以我从谷歌云平台导入了它。我想这可能是问题所在。我尝试在另一个帐户上创建一个全新的项目,然后添加了一个全新的应用程序。 Firebase 按预期工作。有人在从 Google Cloud Platform 迁移时遇到过任何问题吗?
【问题讨论】:
标签: ios objective-c firebase google-cloud-platform firebase-analytics