【发布时间】:2016-12-22 16:39:50
【问题描述】:
我正在尝试将 Firebase 后端集成到我的应用中。
用
创建了我的 podfilepod 'Firebase'
使用 sdk 导入一切正常
在我的第一个视图控制器中:
import Firebase
override func viewDidLoad() {
super.viewDidLoad()
let ref = Firebase(url: "https://<YOUR-FIREBASE-APP>.firebaseio.com")
ref.authAnonymouslyWithCompletionBlock { error, authData in
if error != nil {
// There was an error logging in anonymously
} else {
// We are now logged in
}
}
}
但我有一个Can not call value of non-function type error
提前致谢
【问题讨论】:
-
您使用的是哪个版本的 firebase??
-
在 podfile 中我没有提到这一点
-
@EICaptainv2.0 感谢您的链接,我认为每个定义都已更改
-
@EICaptainv2.0 使用 parse.com 后,真是一种折磨
标签: ios swift xcode firebase firebase-authentication