为什么Firebase自动屏幕报告会导致我的iOS应用程序崩溃? [英] Why is Firebase Automatic Screen Reporting causing my iOS app to crash?

查看:57
本文介绍了为什么Firebase自动屏幕报告会导致我的iOS应用程序崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用基本写入代码将数据写入Firebase数据库.我正在使用Swift进行编程,因此我创建了对数据库的引用,并遵循Firebase帮助页面上的官方说明.当我使用write命令运行应用程序时:

I want to write data to Firebase Database using basic write code. I am programming in Swift so I created the reference to the database and followed the official directions on Firebase's help page. When I run the app using the write command:

override func viewDidLoad() {
    ref = Database.database().reference()
    ref.childByAutoId().setValue(titleText)
}

应用崩溃了,并给了我错误:

The app crashed and gives me the error:

分析"屏幕报告已启用.调用+ [FIRAnalytics setScreenName:setScreenClass:]设置屏幕名称或覆盖默认屏幕类名称.要禁用屏幕报告,请将Info.plist中的标志FirebaseScreenReportingEnabled设置为NO(布尔值)

Analytics 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

我已经尝试禁用FirebaseScreenReporting,但是应用程序崩溃并返回错误:

I have already to tried to disable FirebaseScreenReporting but the app crashes and returns the error:

分析"屏幕报告已禁用.UIViewController过渡将不会被记录.

Analytics screen reporting is disabled. UIViewController transitions will not be logged.

我希望能够将存储在变量"titleText"中的数据写入Firebase,但是如果应用程序无法正确运行,我什至无法进行测试.如何使应用程序运行并正确消除此错误?

I wanted to be able to write the data stored in the variable "titleText" to Firebase but I am not able to even test that without the app running correctly. How can I get the app to run and dismiss this error correctly?

推荐答案

实际的错误不在Firebase屏幕报告中.可以在所有Firebase数据下方找到该错误.我收到的实际错误是该页面上文本字段之一的键编码兼容错误.

The actual error is not in Firebase Screen Reporting. The error can be found below all of that Firebase data. The actual error I was receiving was a key-coding compliant error for one of the text fields on that page.

这篇关于为什么Firebase自动屏幕报告会导致我的iOS应用程序崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆