8
votes

I'm having issues with keychain on iOS 10 devices. Failed to retrieve saved users, only happens with iOS 10 users, authentication is with Firebase. This is the error:

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

2
Are you trying this on an actual device or in the simulator? There is a Keychain bug with the iOS 10 simulator. The error code is different, but it might still be related: openradar.appspot.com/27844971Jordan
@JordanBondo On the deviceTal Zion
did you solve this? I seem to be having the same issuedev_mush

2 Answers

9
votes

As mentioned in the link of the first answer there is a workaround:

  1. Go to your *.xcodeproj
  2. Go to the tab "Capabilities"
  3. Activate "Keychain Sharing"


Btw, is there an issue tracker for xcode?

0
votes

My issue (same as above) was fixed by simply removing the$(AppIdentifierPrefix) string which is added to the entitlements file (if you use Xcode UI to add the keychain sharing group).