0
我正在尝试将Firebase后端集成到我的应用程序中。Swift2中的Firebase身份验证匿名
创建我podfile与
pod '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我没有提到那 –
所以最新的一个权利...比https://firebase.google.com/support/guides/firebase-ios –