Firebase无法在运行iOS 10的某些设备上配置和加载用户 [英] Firebase fails to configure and load the user on some devices running iOS 10

查看:61
本文介绍了Firebase无法在运行iOS 10的某些设备上配置和加载用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试调试为什么[FIRApp configure]在某些运行iOS 10的设备上启动时无法加载已保存的用户的原因.

I'm trying to debug why [FIRApp configure] fails to load saved user on start-up on some devices running iOS 10.

类似于Firebase SDK使用的钥匙串问题.

Looks like an issue with the Keychain used by the Firebase SDK.

任何帮助将不胜感激.

配置"Firebase"时,请参见以下日志

See log below when configuring `Firebase'

启动时加载已保存的用户时出错:Error Domain = FIRAuthErrorDomain代码= 17995访问钥匙串时发生错误.@c NSError.userInfo词典中的@c NSLocalizedFailureReasonErrorKey字段将包含有关遇到的错误的更多信息" UserInfo = {NSLocalizedDescription =访问钥匙串时发生错误. @c NSError.userInfo字典中的@c NSLocalizedFailureReasonErrorKey字段将包含有关遇到的错误的更多信息,error_name = ERROR_KEYCHAIN_ERROR,NSLocalizedFailureReason = SecItemCopyMatching(0)}

Error loading saved user when starting up: Error Domain=FIRAuthErrorDomain Code=17995 "An error occurred when accessing the keychain. The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo dictionary will contain more information about the error encountered" UserInfo={NSLocalizedDescription=An error occurred when accessing the keychain. The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo dictionary will contain more information about the error encountered, error_name=ERROR_KEYCHAIN_ERROR, NSLocalizedFailureReason=SecItemCopyMatching (0)}

推荐答案

发现了问题!在.entitlements文件中使用不同的捆绑包标识符进行生产和发布时,它导致钥匙串注销用户.

Found the issue! When using different bundle identifiers for production and release in the .entitlements file, it caused Keychain to logout the user.

您需要做的是为每个方案创建两个.entitlements文件,并在构建设置中进行设置.

What you need to do is create two .entitlements file for each scheme, and set it in the build settings.

这篇关于Firebase无法在运行iOS 10的某些设备上配置和加载用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆