首页 文章

如何使用Siri套件扩展程序启用钥匙串共享?

提问于
浏览
0

我想在我的应用和sirikit扩展程序之间启用钥匙串共享 . 我为app和sirikit添加了相同字符串的keychain访问组 . 还为具有相同字符串的两个目标添加了App组 . 我使用Locksmith作为钥匙串包装器,它还使用值为teamID keychain访问组ID的kSecAttrAccessGroup属性 . 但是当我尝试从siri扩展运行时,我收到以下错误:

CredStore - performQuery - Error copying matching creds.  Error=-25300, query={class = inet;
        "m_Limit" = "m_LimitAll";
        ptcl = htps;
        "r_Attributes" = 1;
        srvr = "appurl.com";
        sync = syna;
    }

任何指导表示赞赏 . 谢谢

1 回答

  • 0

    它之所以无效,是因为TeamID或AppIdentifierPrefix在app和siri扩展使用的配置文件中有所不同 . 当我们使用钥匙串访问组时,如果您检查权利,则钥匙串访问组的前缀是AppIdentifierPrefix,它是随您的帐户附加的TeamID或AppID:

    <key>keychain-access-groups</key>
    <array>
        <string>$(AppIdentifierPrefix)common_keychain_access_group_string</string>
    </array>
    

    对于app和sirikit,此AppIdentifierPrefix必须相同 . 谢谢

相关问题