如何通过Siri工具包扩展启用钥匙串共享? [英] How to enable keychain sharing with Siri kit extension?

查看:139
本文介绍了如何通过Siri工具包扩展启用钥匙串共享?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I want to enable keychain sharing between my app and sirikit extension. I have added keychain access group with same string for app and sirikit. Also added App group for both the targets with same string. I am using Locksmith as a keychain wrapper, which is also using the kSecAttrAccessGroup property with the value teamID + keychain access group ID. But I am getting the following error when I try to run from siri extension:

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;
    }

任何指导表示赞赏.谢谢

Any guidance is appreciated. Thank you

推荐答案

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

The reason it was not working because the TeamID or AppIdentifierPrefix was different in the provisioning profile the app and the siri extension was using. When we us the keychain access group, if you check the entitlements the keychain access group is prefixed with AppIdentifierPrefix which is the TeamID or AppID that is attached with your account:

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

此AppIdentifierPrefix对于该应用程序和sirikit必须相同. 谢谢

And this AppIdentifierPrefix must be same for both the app and sirikit. Thank you

这篇关于如何通过Siri工具包扩展启用钥匙串共享?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆