【问题标题】:Xcode 11 Firebase auth for Mac app has error An error occurred when accessing the keychainXcode 11 Firebase auth for Mac app has error 访问钥匙串时出错
【发布时间】:2019-11-27 00:08:13
【问题描述】:

当我为 My Mac 运行 Xcode 时,我正在将 iOS 应用程序转换为 Mac 应用程序, 我试图在 Mac 上登录我的应用程序,当我按下按钮登录时,错误显示如下:

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

它在 iPhone 模拟器或真 iPhone 上运行良好,仅在我尝试在 Mac 上运行时才会出现

我认为这是 Firebase 确实 Auth 并不能很好地支持 Mac 应用程序的问题。

PS:有一个问题看起来有点像,但我不太明白 Firebase fails to configure and load the user on some devices running iOS 10

【问题讨论】:

    标签: ios firebase firebase-authentication ios13 xcode11


    【解决方案1】:

    Keychain Sharing Capability 添加到目标的构建设置中。更多上下文here

    点击+功能,然后选择Keychain Sharing Capability

    【讨论】:

    • 能否请您更具体地说明如何添加Keychain Sharing Capability
    • 在我的Singing & Capebilities 中,我根本看不到那个选项。只有三个大的部分。 1.Signing 2.App Sandbox 3.Hardened Runtime
    • 添加截图
    猜你喜欢
    • 2020-06-20
    • 1970-01-01
    • 1970-01-01
    • 2016-11-27
    • 1970-01-01
    • 2012-10-31
    • 2021-07-09
    • 2018-05-14
    • 1970-01-01
    相关资源
    最近更新 更多