[英]FIRAuth.auth() compiling error: “Cannot use optional chaining on non optional value 'FIRAuth'”
Cannot use optional chaining on non optional value 'FIRAuth' 无法在非可选值“ FIRAuth”上使用可选链接
I have tested every solutions, but always got the same error. 我已经测试了每种解决方案,但始终会遇到相同的错误。 Even if i create a new project, when i'm using FIRAuth, i always got a compiling error. 即使我创建一个新项目,当我使用FIRAuth时,总是会出现编译错误。
Can someone help me please. 有人能帮助我吗。 I use Swift 2, Xcode 7, IOS9 我使用Swift 2,Xcode 7,IOS9
If you are trying to add FIRAuth.auth()?
如果您要添加FIRAuth.auth()?
try to remove (?). 尝试删除(?)。
FIRAuth.auth() is non optional so treating them as one might result to the error “Cannot use optional chaining on non optional value 'FIRAuth'” FIRAuth.auth()是非可选的,因此将它们视为一个可能会导致错误“无法在非可选值'FIRAuth'上使用可选链接”
Optional chaining is a process for querying and calling properties, methods, and subscripts on an optional that might currently be nil 可选链接是一个查询和调用当前可能为零的可选属性,方法和下标的过程
Check Optional Chaining 检查可选链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.