Firebase:在Swift 4上找不到FIRUser

时间:2022-01-28 19:46:44

I've started using Firebase and I followed Ray Wenderlich tutorial.

我已经开始使用Firebase了,我遵循了Ray Wenderlich教程。

After that I created my own project and there nothing works anymore. I've installed the Firebase pods, I created a bridge header for Firebase framework (like in tutorial). It didn't work so I removed it and I made simply import.

之后,我创建了自己的项目,没有任何工作了。我安装了Firebase pod,我为Firebase框架创建了一个桥头(就像在教程中一样)。它没有用,所以我删除它,我只是导入。

I can import the Firebase in my class but when I try to add :

我可以在我的班级中导入Firebase,但是当我尝试添加时:

FIRUser or Firebase.User (like in the Firebase Authentication documentation)

FIRUser或Firebase.User(与Firebase身份验证文档中一样)

it doesn't work. I have not a lot of choices there... I can't do anything (see the attached photo).

它不起作用。那里我没有太多选择......我什么都做不了(见附图)。

Firebase:在Swift 4上找不到FIRUser

1 个解决方案

#1


2  

As the documentation states, when migrating to the latest version of the SDK for Swift, remove any FIR prefix, so FIRUser becomes User. You can find the reference here.

正如文档所述,当迁移到最新版本的Swift SDK时,删除任何FIR前缀,以便FIRUser成为用户。你可以在这里找到参考。

#1


2  

As the documentation states, when migrating to the latest version of the SDK for Swift, remove any FIR prefix, so FIRUser becomes User. You can find the reference here.

正如文档所述,当迁移到最新版本的Swift SDK时,删除任何FIR前缀,以便FIRUser成为用户。你可以在这里找到参考。