Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/114.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios “auth()”不可用:请使用对象构造“FIRAuth()”_Ios_Swift_Firebase_Firebase Authentication - Fatal编程技术网

Ios “auth()”不可用:请使用对象构造“FIRAuth()”

Ios “auth()”不可用:请使用对象构造“FIRAuth()”,ios,swift,firebase,firebase-authentication,Ios,Swift,Firebase,Firebase Authentication,我得到: “auth”不可用:使用对象构造“FIRAuth” 我在pod文件中添加了pod“Firebase/Auth”,并执行pod安装 FIRAuth.auth().signInWithEmail("essammohamedomran@gmail.com", password: "rootroot") {(user: FIRUser?, error: NSError?) -> Void in if error == nil { print(user?.e

我得到:

“auth”不可用:使用对象构造“FIRAuth”

我在pod文件中添加了pod“Firebase/Auth”,并执行pod安装

FIRAuth.auth().signInWithEmail("essammohamedomran@gmail.com", password: "rootroot") {(user: FIRUser?, error: NSError?) -> Void in
    if error == nil
    {
        print(user?.email);
    }
    else
    {
        print(error?.description);
    }
}
然而,当我使用已经需要在其上安装框架(如“Firebase/Auth”)的项目时,同样的代码也适用于我

我安装的CoCoapod有问题吗

更新:

最后,我发现这是Xcode版本的问题。。我已经将我的Xcode v7.2更新为Xcode v8.2,我的问题解决了


谢谢大家,

将FIRAuth.auth更改为auth.auth。Firebase的最新版本使用Auth进行授权。

我不会通过应用程序代理登录。相反,在初始视图控制器中创建一个按钮,并添加登录用户的操作。我认为应用程序中的作用域委托无法识别身份验证,因为它仍在配置中。

我以前尝试过此解决方案,但它对我不起作用!如果您向我发送代码,我可以调试它并向您显示错误。非常感谢,我可以在此处编写发生错误的appDelegate代码,或者我可以向您发送项目以查看pod文件和其他文件。。这很简单,因为我没有写更多的代码。请将项目发送给我'theheibergproject@gmail.com'如果您使用的是Firebase 4.x的最新版本,则不再使用FIRAuth,它是Auth。但是,如果您使用的是Firebase 3,则FIRAuth是正确的。正如你所看到的,问题中没有足够的信息来提出准确的答案。更重要的是,无论哪种方式,FIRAuth.auth.signiWithEmail都是无效的。这是Auth.Auth.signin,电子邮件:。。。。请看