iOS 15 simulator gets `false` return from `getGenericPassword()`
I just upgraded to iOS 15 and spent half my day troubleshooting weird login behavior on iOS 15 simulators.
It seems like the getGenericPassword() always returns false. I went into the native ObjC code and I can see that the values are stored as expected in the Keychain but when I try to get them out, it ends up with resolving with a @(NO) which becomes false on the JS side.
When debugguing, I can see that SecItemCopyMatching gives me an errSecItemNotFound = -25300 (see screenshot)
I'm running RN 0.63.3 and the latest version of RNKeychain, but also tried with version 6.xx with same result.
It works as expected on an iOS 14.5 simulator as well as my iPhone 12 Pro Max with iOS 15.0

I think iOS 15 has broken a whole lot of keychain related methods. I am experiencing similar funky behaviour across the board with various methods in this lib.
same issue here, been present since the ios 15 simulator beta
The error is being triggered here : https://github.com/oblador/react-native-keychain/blob/master/RNKeychainManager/RNKeychainManager.m#L237-L241 SecItemAdd returns OSStatus -25293 (errSecAuthFailed)
Seems to be the same issue as described in https://developer.apple.com/forums/thread/685773
I'm facing the same issue on iOS 15. Everything works well on iOS 15. Any updates? Thank you guys so much
@anhquan291
Do you face this issue on a simulator, or real device?
I still don't know if this is a Simulator only bug, or also reproducible on an real iPhone.
@anhquan291 Do you face this issue on a simulator, or real device? I still don't know if this is a Simulator only bug, or also reproducible on an real iPhone. @Wyctus I'm not be able to test on Simulator yet. Only have the iPA build on real Device. The check Biometrics support and setPassword work well but the getPassword. :(
@oblador Is there any progress with this issue? Thanks!
I am experiencing this issue on a physical device, iPhone XR iOS 14.4.2, I also have reports of this happening on a physical iPhone XR, iOS 14.5.
Any updates?
Hi guys,
I've been taking a look and it seems that this may be an issue due to the new iOS15 ability to pre-warm the apps with no need for user interaction and even when the device is locked: https://sourcediving.com/solving-mysterious-logout-issues-on-ios-15-8b818c089466
Apple documentation here: https://developer.apple.com/documentation/uikit/app_and_environment/responding_to_the_launch_of_your_app/about_the_app_launch_sequence?language=objc#3894431
If this is the actual reason, changing the accessible to AFTER_FIRST_UNLOCK or ALWAYS could do the trick
If this is the actual reason, changing the
accessibleto AFTER_FIRST_UNLOCK or ALLWAYS could do the trick
To me it seems like this change will sometimes solve the problem but not aways. I still have issues with this :(
Any updates?
Any updates?