iOS Question keychain problem

tufanv

Expert
Licensed User
Longtime User
Hello,

After upgrading to b4i 3.0 or maybe to ios10 , dont sure exactly , I have an interesting problem.
I have 2 apps that are already on the store ( which means i am sure their package names are different )

I always remember username and password with using keychain all in my apps. If login is succcess than i add
p.keychainput("username",txtusername.text) and same for the password. Today i realized that after i compile my apps with b4i 3.0 beta , i logged in to my one of my apps and entered my information and logged in. Later i opened my other app and saw that , the username and password i used in my other app is remembered in this app. i use same keys all in my apps and i did this without any problem but today, it is something like all my apps use the same keychain and when i put username and password keys into keychain my other app is also getting that value from the keystore. I know it seems interesting but this is the case . What may be wrong ?

TY
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
It is related to a change in Xcode 8.

Add this line:
B4X:
#Entitlement: <key>keychain-access-groups</key><array><string>558J7LMQ55.*</string></array>
Change 558J7LMQ55 with your 10 characters prefix. You can find it in the provision profile file under ApplicationIdentifierPrefix or in the app ids section of the developer console: https://developer.apple.com/account/ios/identifier/bundle
 
Last edited:
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
I'm sure I'm misunderstanding:
If I don't use the entitlement all the user that have a specific app installed obtain the same value from keychain ?
The app store in the keychain "DeviceID:123456789" and all other apps obtain 123456789 reading DeviceID from the keychain ? o_Oo_O
 
Upvote 0
Top