We are having a tough time trying to shared info between two apps with keychain service.
We have two apps:
1.- CoreApp, which is native and use this plugin SSKEYCHAIN to set values:
+ (BOOL)setPassword:(NSString *)password forService:(NSString *)serviceName account:(NSString *)account;
Where are setting for paramenter the following values:
password = aaa
serviceName = bbb
account = ccc
2.- SatelliteApp, which is hybrid (cordova) and use this plugin KeychainPlugin to get values:
kc.getForKey(successCallback, failureCallback, 'ccc', 'bbb');
The failureCallback is triggered with the message:
"Error retrieving vale for key ccc : (null)"
We have done some tests:
1.- We have do another native app that queries the keychain populated by CoreApp and it works good.
2.- we have do another hybrid app that set values in the keychain and the SatelliteApp queries it succesfully.
It seems like we are not setting the values in the same container that we are retreiving the values from the other app. But we do not know how to point all the apps to the same place.
Has anyone idea what could be happening? Any hint, test to do or advice would be highly appreciated.
Thanks very much.
I had the same problem. My solution was to change the plugin in Cordova by com.crypho.plugins.securestorage (http://plugins.cordova.io/#/package/com.crypho.plugins.securestorage).
The problem is that SSKeychain plugin has a keychain access group different to Cordova Keychain Plugin, so between apps that use the same plugin work good, but when the plugins are different doesn't work.
com.crypho.plugins.securestorage documentation: On iOS secrets are stored directly in the KeyChain through the SSKeychain library.