我一直收到这个错误
使用无法解析的标识符“Auth”

Auth.auth().createUser(withEmail: email, password: password) { (user, error) in
let ref = Database.database().reference(fromURL: "https://app-project.firebaseio.com")
let usersReference = ref.child("Users")
let id = usersReference.childByAutoId().key
InstanceID.instanceID().instanceID(handler: { (result, error) in
let token = result?.instanceID
let values = ["phone": phone,"CreatedAt":dateString,"UpdatedAt":dateString,"id":id as Any,"token":token as Any] as [String : Any]
usersReference.child(id!).setValue(values, withCompletionBlock: { (err, ref) in
if err != nil {
print(err.self as Any)
return
}
print("Successfully saved user in Firebase DB")
})
})
}Podfile
platform :ios, '10.0'
use_frameworks!
target 'project' do
pod 'Charts'
pod 'SwiftyJSON'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Database'
pod 'Firebase/Auth'
end我已经在我的文件上使用了这个
import Firebase
import FirebaseDatabase我试着重建,仍然能看到它。
重新启动XCode,重建时仍然可以看到它。
如何进一步调试呢?
https://stackoverflow.com/questions/53658161
复制相似问题