0
votes

It seems to be a big feature to share data between different Apps through the iOS Keychain, but how can I avoid the sharing between apps? I can't find anything for that case in the Apple documentation.

I know that the access-group and therefore the access of the keychain for an app is defined through the provisioning profile with the parameter keychain-access-groups.

<key>Entitlements</key>
<dict>
    <key>application-identifier</key>
            ...
    <key>keychain-access-groups</key>
    <array>
        <string>XXXXXXXXXX.*</string>
    </array>
</dict>

After Apple redesigned their developer-page it is not more possible to create different App-Prefix-Ids where defines the keychain-access-groups. I hope someone can give me a hint, how to prevent the sharing of the keychain for different apps with the same code base.

Additional Note: It is not possible to save the data with different keys.

Update: I found an attribute that set on runtime the keychain-access-group kSecAttrAccessGroup I think this should help to fix the problem.

1

1 Answers

0
votes

You misunderstood what share means here, which is you can opt to share with different apps produced by you and accepted by Apple. Arbitrary apps cannot access your app's keychain data.