问题描述
我尝试使用快速设置说明和Firebase网站上的手动备用说明,设置Firebase以使用Xcode。
当我使用CocoaPods并遵循在快速设置页面上的说明,我能够导入Firebase,但是我无法在课堂内引用Firebase。我得到了错误:无法调用非函数类型的'模块'xcode的值
当我试图手动设置它,我无法导入或引用火我得到的错误:没有这样的模块Firebase Firebase版本。在Google I / O上宣布了一大堆变化,因此需要做大量的更新。
听起来你可能会使用旧版本Firebase与新的SDK。您应该尽全力使用Firebase 3.0。因此 var rootRef = Firebase(网址:https://<您的火狐 - APP> .firebaseio.com)现在将 var请参阅设置指南:(请确保您不是看着遗留的文档!)。如果您想将代码从旧版本的Firebase转换为3.0,请查看升级教程:
I have tried to set up Firebase to work on Xcode using both the quick setup instructions and the manual alternate instructions on Firebase website.
When I used CocoaPods and followed the instructions on the quick setup page, I was able to import Firebase, but I was not able to reference Firebase inside the class. I got the error: Cannot call value of non-function type 'module' xcode
When I tried to set it up manually, I was not able to import or reference Fire base and I got the error: No such module 'Firebase'
I had the same issue when updating my project to the new version of Firebase. A TON of changes were announced at Google I/O and thus there is a good amount of updating to be done.
It sounds like you might be using the old version of Firebase with the new SDK. You should do everything with Firebase 3.0. Hence var rootRef = Firebase(url:"https://<YOUR-FIREBASE-APP>.firebaseio.com") will now be var rootRef = FIRDatabase.database().reference().
Take a look at the setup guide at: https://firebase.google.com/docs/ios/setup#prerequisites (be sure you aren't looking at the legacy docs!). If you want to convert code from the old version of Firebase to 3.0, check out the Upgrading tutorial: https://firebase.google.com/support/guides/firebase-ios#get_a_database_reference_numbered
这篇关于在Xcode中设置Firebase时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!