iOS Question Keychain group access - sharing Keychain data between apps

luc-dev

Member
Licensed User
Longtime User
Hello,

Is it possible to activate Keychain group access with B4i ?

Thank you
Luc
 

luc-dev

Member
Licensed User
Longtime User
Yes, I am able to access the app keychain using KeyChainPut, Get, Remove but I would like to access the same KeyChain record from several apps and I can't figure out how to do that.

I tried

B4X:
#Entitlement: <key>keychain-access-groups</key><array><string>ABCDEFGHIJ.com.myCompany.MyApp</string></array>

and also

B4X:
#Entitlement: <key>keychain-access-groups</key><array><string>ABCDEFGHIJ.*</string></array>

where ABCDEFGHIJ is the Apple AppID Prefix that is shared between the apps

Did I miss something?
 
Upvote 0

luc-dev

Member
Licensed User
Longtime User
I tried with the wildcard, adding the

B4X:
#Entitlement: <key>keychain-access-groups</key><array><string>ABCDEFGHIJ.*</string></array>

to two of my apps. I use the same keychain key in the two apps to retreive the value.

Each app still retrieves its own value from the KeyChain store. Do I have to change something to Apple Dev Account/Certificates/ids ?
 
Upvote 0

luc-dev

Member
Licensed User
Longtime User
It finally works, at least with dev certificate/provisioning files. I tested with 3 apps. I hope it will work the same with production certificate.

Many thanks for your time and testing
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…