CFo*_*lie 9 google-analytics ios firebase firebase-analytics
我在控制台和应用程序中都设置了firebase.一切都配置正确,事件似乎在应用程序中登录.
输出到控制台:
<FIRAnalytics/DEBUG> Logging event: origin, name, params: app,
log_something, {
"_o" = app;
"full_text" = khbsdpibdsjl;
name = lwkjbgskljsavdkjl;
}
Run Code Online (Sandbox Code Playgroud)
我启用了调试标志:-FIRDebugEnabled.
然而在调试事件控制台中没有任何东西.我看到没有可用的设备,没有记录任何事件,绝对0指示任何连接.我肯定错过了什么?
编辑:我一直在关注这个以设置调试事件.https://firebase.google.com/docs/analytics/debugview#enabling_debug_mode
我在StreamView中看到事件,但是在调试视图中没有任何内容,即使我启用了调试模式.
Rei*_*ill 12
或者,您可以在 AppDelegate 中执行此操作:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
var newArguments = ProcessInfo.processInfo.arguments
newArguments.append("-FIRDebugEnabled")
ProcessInfo.processInfo.setValue(newArguments, forKey: "arguments")
}
Run Code Online (Sandbox Code Playgroud)
- -额外的 - -
只是一些想法:
关于
Firebase.Analytics.setAnalyticsCollectionEnabled(true)
Run Code Online (Sandbox Code Playgroud)
如果我们检查该方法:
所以这有点毫无意义......
小智 8
我也有同样的问题.
1检查您的Cocopods的Firebase版本.
2打开调试模式
试试这个,这对我来说是工作,
请按照以下步骤操作,
1.在Xcode中,选择产品?计划?EditScheme。
2. 从左侧菜单中选择“运行”,然后 在“传递的参数+”选项中选择“参数”选项卡
添加-FIRDebugEnabled
有关详细的调试视图,请遵循以下步骤: DebugView跟踪Firebase文档
要在XCode项目中发送事件,请遵循以下代码,
目标C
[FIRAnalytics logEventWithName:@"share_image"
parameters:@{@"name": name, @"full_text": text}];
Run Code Online (Sandbox Code Playgroud)
迅速
Analytics.logEvent("share_image", parameters: ["name": name, "full_text": text])
Run Code Online (Sandbox Code Playgroud)
对于事件日志,请遵循详细步骤,在Application Firebase文档中记录事件
希望这会帮助某人。
我通过编写以下内容使其成为可能:
func application(_ application: UIApplication, didFinishLaunchingWithOptions, ...) {
// some other initialization
FirebaseApp.configure()
Firebase.Analytics.setAnalyticsCollectionEnabled(true)
}
Run Code Online (Sandbox Code Playgroud)
小智 5
现在,这无关紧要,但对于在此问题上遇到错误的人们来说仍然如此。有时由于GoogleServices-Info.plist文件中的问题,firebase分析的调试模式有时无法正常工作。只需进行这两项更改即可。
确保在-FIRDebugEnabled之前添加一个DASH
我浪费了一整天,因为错过了DASH而犯了愚蠢的错误
希望别人不会发生这种情况!
| 归档时间: |
|
| 查看次数: |
7879 次 |
| 最近记录: |