导入Firebase后,Xcode 8.0测试版会发出错误提示 [英] Xcode 8.0 beta give an error after import Firebase
问题描述
我使用Xcode 8.0 beta 5或6创建空的swift项目,并使用Firebase指南等cocoapods导入Firebase。在进口过程中,一切都很好。我使用 FIRApp.Configure()
评论配置firebase。我可以处理身份验证,但是当我尝试到达数据库它不起作用。
$ b
生成时间错误 FIRApp.h
$ b $ pre $ 返回类型的空性说明符冲突, b $ b
另外这些控制台中的错误:
2016-08-26 13:00:32.719:< FIRInstanceID / WARNING>停!!将从内存中重置deviceID。
2016-08-26 13:00:32.719:< FIRInstanceID / WARNING>无法获取默认的令牌Error Domain = com.firebase.iid Code = 6(null)
2016-08-26 13:02:08.329:< FIRInstanceID / WARNING>无法检索5次重试后的默认GCM令牌
我无法解决问题。 >
构建时间警告与可空性声明检查中的Xcode 8更新有关。它应该是无害的,并在即将发布的版本中修复。
FIRInstanceID错误与Xcode 8测试版中的钥匙串错误有关。看到这个雷达。钥匙串问题只影响模拟器运行。测试结束之前应该有一个修复。同时,解决方法是启用钥匙串共享(请参阅本杰明的答案)或使用真实设备。
钥匙串错误在Xcode 8.2中已修复。
I create empty swift project with Xcode 8.0 beta 5 or 6 and import Firebase with use cocoapods like Firebase guidelines. Everythings fine while import process. I configure firebase with FIRApp.Configure()
comment. I can handle with Authentication but when I try to reach database it didn't work.
Build time error in FIRApp.h
like :
"Conflicting nullability specifier on return types, 'nullable' conflicts with existing specifier 'non null'"
Screenshot of FIRApp.h Build-time error
Also these kind of error in the console:
2016-08-26 13:00:32.719: <FIRInstanceID/WARNING> STOP!! Will reset deviceID from memory.
2016-08-26 13:00:32.719: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=6 "(null)"
2016-08-26 13:02:08.329: <FIRInstanceID/WARNING> Failed to retrieve the default GCM token after 5 retries
I couldn't solve the problem.
The build time warning is related to Xcode 8 updates in nullability declaration checking. It should be innocuous and fixed in an upcoming release.
The FIRInstanceID errors are related to a keychain bug in the Xcode 8 beta. See this radar. The keychain problem only impacts simulator runs. There should be a fix before the beta ends. In the meantime, the workaround is to enable keychain sharing (see Benjamin's answer) or to use a real device.
The keychain bug is fixed in Xcode 8.2.
这篇关于导入Firebase后,Xcode 8.0测试版会发出错误提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!