【问题标题】:Issue with entitlements in iOS when using firebase使用 firebase 时 iOS 中的权利问题
【发布时间】:2019-01-17 21:42:52
【问题描述】:

我正在使用 Firebase 构建我的应用。当我在模拟器上测试时,一切都很好。但是当我尝试在设备上进行测试时,出现以下错误:

Showing Recent Messages
Automatic signing is unable to resolve an issue with the "xxx" target's entitlements. Automatic signing can't add the com.apple.keystore.device and com.apple.keystore.access-keychain-keys entitlements to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code. (in target 'xxx')

Provisioning profile "iOS Team Provisioning Profile: com.xxx.xx" doesn't include the com.apple.keystore.access-keychain-keys and com.apple.keystore.device entitlements. (in target 'xxx')

正如我在 firebase 文档中看到的那样,我添加了以下文件以及我需要的权利:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.keystore.access-keychain-keys</key>
    <true/>
    <key>com.apple.keystore.device</key>
    <true/>
</dict>
</plist>

您可以在下面看到我如何在 Apple Developer Portal 中设置我的应用程序(我也尝试使用受保护的除非打开)

这是我的钥匙串分享

这里是数据保护

所以我想我错过了在开发者门户中设置钥匙串共享,但我不确定如何...我检查了所有选项并用谷歌搜索,但我找不到解决方案。我想检查是否可以保留自动登录,或者我是否必须手动进行

【问题讨论】:

  • 嘿,你成功了吗?我的项目遇到了同样的问题。如果您找到了,请发布解决方案。

标签: ios firebase entitlements


【解决方案1】:

在我看来,Apple 处理钥匙串的语法发生了变化。也许是 Xcode 升级之类的。

删除这个:

    <key>com.apple.keystore.access-keychain-keys</key>
    <true/>
    <key>com.apple.keystore.device</key>
    <true/>

并添加:

    <key>com.apple.security.application-groups</key>
    <array>
        <string>group.com.Yours.app</string>
    </array>
    <key>keychain-access-groups</key>
    <array>
        <string>$(AppIdentifierPrefix)group.com.Yours.app</string>
        <string>$(AppIdentifierPrefix)com.Yours.app</string>
    </array>

然后改为在您的 Apple Developer 配置设置中设置组。

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,并通过从权利文件中删除这些键和值来解决它。

    nativescript-plugin-firebase 文档说,如果您在 iOS 模拟器中遇到问题,则需要它们。您可以删除它们。

    【讨论】:

      猜你喜欢
      • 2011-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-09
      • 1970-01-01
      • 2019-08-05
      相关资源
      最近更新 更多