How is your experience with the OutSystems Community?
9
Views
1
Comments
How to enable iOS Keychain Sharing (keychain-access-groups) across sibling Mobile App
Application Type
Mobile

Hi folks,


I'm developing multiple OutSystems Mobile Apps (O11) targeting iOS, signed with the same Apple Developer Team ID. We need these sibling apps to share sensitive data securely between them using iOS Keychain Sharing (keychain-access-groups). 

My goal

  • Apps: App 1 (org.mycompany.dev.ClerkApp1) and App 2 (org.mycompany.dev.ClerkApp2)
  • Requirement: We want both iOS apps to read and write to a shared Keychain Access Group (e.g. $(AppIdentifierPrefix)group.org.mycompany.shared) so that when a user logs in on App 1, App 2 can access the shared Keychain item.


I previously refered resources:

https://developer.apple.com/documentation/security/sharing-access-to-keychain-items-among-a-collection-of-apps

https://developer.apple.com/documentation/xcode/configuring-keychain-sharing

https://www.outsystems.com/forums/discussion/50400/ios-capabilities/

Is there  any way to configure it in the outsystems extensibilty configurations or In cordova plugin?
your guidance will be helpful. Thanks 

2019-11-11 17-10-24
Manish Jawla
 
MVP

Hi @Mohan Sigamani ,

For this case, I don't think adding keychain-access-groups in the normal Extensibility Configuration will be enough.

You will most likely need a small custom Cordova plugin to add the Keychain Sharing entitlement to the generated iOS app.

Both apps should use the same Keychain Access Group, for example:

$(AppIdentifierPrefix)group.org.mycompany.shared

Also, both apps need to be under the same Apple Developer Team, and the provisioning profiles should include the same Keychain Sharing capability.

One important point: adding the entitlement only gives both apps access to the shared Keychain group. When saving or reading the value, the native Keychain code also needs to use the same kSecAttrAccessGroup.

So the setup would be:

  1. Enable the same Keychain Sharing group for both App IDs in Apple Developer.

  2. Regenerate the provisioning profiles.

  3. Use a custom plugin to add the keychain-access-groups entitlement.

  4. Use the same access group when reading/writing values in the iOS Keychain.

  5. Rebuild both apps and test them on a real iOS device.

I wouldn't add this to Info.plist, as Keychain Sharing is an iOS entitlement.

Hope this helps.

Regards,

Manish Jawla

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.