Open hugoeanogueira opened 10 years ago
Any luck resolving this?
I'm seeing the same issue when creating a keychainitem like
keychainItem = Keychain.createKeychainItem('server_account', 'passphrase'),
however using the method in the example seems to work ok, which is like
var userKeychainItem = keychain.createKeychainItem('username');
var passKeychainItem = keychain.createKeychainItem('password');
This is the error I'm getting
[ERROR] : creating keychain item: -25243
[ERROR] : acct = "user2@example.com";
[ERROR] : agrp = passphrase;
[ERROR] : desc = "";
[ERROR] : gena = "server_account";
[ERROR] : icmt = "";
[ERROR] : labl = "";
[ERROR] : svce = "com.obscure.keychain";
[ERROR] : "v_Data" = "";
[ERROR] : }
[ERROR] : creating keychain item: -25243
[ERROR] : acct = "user2@example.com";
[ERROR] : agrp = passphrase;
[ERROR] : desc = "";
[ERROR] : gena = "server_account";
[ERROR] : icmt = "";
[ERROR] : labl = "";
[ERROR] : svce = "com.obscure.keychain";
[ERROR] : "v_Data" = password;
[ERROR] : }
From source code and iOS documentation for this module looks like second argument in createKeychainItem
is not ignored, but used as an access group. On the device this value should match your app's keychain-access-groups
entitlements, and ignored on simulator. Try not to use second argument, or use it for Android only.
Thank you @ntchern, that was exactly the problem!
For all others: Use osstatus.com to lookup error-codes. The keychain ones are pretty detailed and helpful. E.g. https://www.osstatus.com/search/results?platform=all&framework=all&search=-25243
@pegli I guess you can close this one.
Hi. Used to have problems loading this modules in mobile devices (iPhone and iPad), but that is gone after the last issue fix/update. But the module seems to fail retrieving data when testing on devices (works fine in Simulator).
These were the methods I've used.
I've also made a demo repository if you want to test by yourself. hugoeanogueira/testing_ti_keychain
Thanks!