Firebase iOS 10 Keychain Access Issue

As I am not proficient in Swift and Xcode, my understanding is that I need to allow cross-app authentication using shared iOS Keychain to authenticate the user in my shared extension. My project has two targets, the “Runner” and the “Share Extension,” and I have enabled Keychain Sharing for both of them. However, enabling Keychain Sharing results in an error when attempting to sign in using Firebase Auth. The error message includes the NSLocalizedFailureReasonErrorKey. How can I resolve this issue?


On iOS 10 devices, I am encountering problems with the keychain. The saved users cannot be retrieved, but this issue is only occurring with iOS 10. The problem is related to Firebase, and the error message is as follows:
users, authentication

Upon startup, there was an issue loading the saved user due to an error in accessing the keychain. Additional information regarding the encountered error can be found in the @c NSLocalizedFailureReasonErrorKey field within the @c NSError.userInfo dictionary. The error was named ERROR_KEYCHAIN_ERROR, and was a result of SecItemCopyMatching (0).

Solution 1:

A workaround has been suggested in the first answer’s link.

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

By the way, is there a problem reporter available for Xcode?

Solution 2:

To resolve my previously mentioned problem, I just needed to delete the $(AppIdentifierPrefix) sequence from the entitlements file. This string is automatically inserted into the file if you utilize the Xcode UI for adding the keychain sharing group.

Frequently Asked Questions

Posted in Ios