Sky
Sky

Reputation: 2442

Xcode 11 Firebase auth for Mac app has error An error occurred when accessing the keychain

I am turning iOS app to Mac app, when I run Xcode for My Mac, I was trying to login my app on Mac, when I press button login, below Error shows:

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

MacOS: 10.15.1 Xcode: 11.2.1

It works totally fine on iPhone simulator or real iPhone, it only occurs when I try to run on Mac

I think this is a issue that Firebase does Auth does not really support Mac app that well.

PS: there is a question looks kind similar, but I don't really understand Firebase fails to configure and load the user on some devices running iOS 10

Upvotes: 3

Views: 1313

Answers (1)

Paul Beusterien
Paul Beusterien

Reputation: 29582

Add Keychain Sharing Capability to the target's build settings. More context here.

Click the + Capability and then choose Keychain Sharing Capability

enter image description here

Upvotes: 4

Related Questions