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

雨燕双飞 提交于 2021-01-28 09:14:24

问题


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


回答1:


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

Click the + Capability and then choose Keychain Sharing Capability



来源:https://stackoverflow.com/questions/59061191/xcode-11-firebase-auth-for-mac-app-has-error-an-error-occurred-when-accessing-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!