Search code examples
iossecuritykeychainsharing

Sharing Keychain Items in iOS


I have application with bundle identifier as com.sakthi.app and app prefix ID as GHWEHDPRAG.I have stored some keychain items in this application using this identifier. Now I want to create another application where I can get keychain items stored in first application.

Tried creating bundle identifier as com.sakthi.apptemp with same app prefix ID. But I am not able to get the keychain items value.

Can you please tell how to access keychain items with same app prefix ID but different app bundle identifier?


Solution

  • You can refer to the Apple documentation here: https://developer.apple.com/library/ios/documentation/security/Reference/keychainservices/Reference/reference.html

    It details how to share items across two or more apps using a keychain-access-groups entitlement