使用Swift将数据保存到Firebase

时间:2021-10-10 20:18:18

I copied the examples from firebase.com but I'm getting an error: 使用Swift将数据保存到Firebase

我从firebase.com复制了示例,但是我收到了一个错误:

I can't get my code to recognize my text dictionary and save it.

我无法让我的代码识别我的文本字典并保存它。

1 个解决方案

#1


1  

So I believe you are referencing a modified version of the following version from the firebase ios docs:

所以我相信你从firebase ios docs引用了以下版本的修改版本:

Consider declaring the newText variable as AnyObject like so:

考虑将newText变量声明为AnyObject,如下所示:

var newText: AnyObject = ["test1": gracehop]

#1


1  

So I believe you are referencing a modified version of the following version from the firebase ios docs:

所以我相信你从firebase ios docs引用了以下版本的修改版本:

Consider declaring the newText variable as AnyObject like so:

考虑将newText变量声明为AnyObject,如下所示:

var newText: AnyObject = ["test1": gracehop]