Closed crysxd closed 6 months ago
Thanks. I'm going to tweak this a little but the general idea makes sense.
Amazing! Thank you! Any rough ETA for the 1.2 release? I now copied the class into our source code with my modifications.
I use your library in all my projects btw, it's a real life saver 👍
This PR improves the way addKeychainItem(...) distinguishes between adding and updating an item when used with FaceID. The original implementation caused two operations on the key chain:
This caused two consecutive FaceID prompts for the user. The new implementation attempts to add the item but then checks for
errSecDuplicateItem
. This error occurs before the FaceID prompt is shown. If the operation fails with this specific error we proceed to update the item, causing a FaceID prompt.To use KeychainSettings with FaceID, you can use this snippet: