1
votes

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

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

Any help will be appreciated.

See log below when configuring `Firebase'

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)}

1

1 Answers

2
votes

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

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