On iOS, readAll (or deleteAll) will return error code errSecItemNotFound(-25300) if the item does not exist in the keychain. This is due to the error code errSecItemNotFound returned by SecItemCopyMatching (or SecItemDelete).
This is expected behavior for iOS processing and is not a bug.
Fixes #391
On iOS,
readAll
(ordeleteAll
) will return error codeerrSecItemNotFound
(-25300
) if the item does not exist in the keychain. This is due to the error codeerrSecItemNotFound
returned bySecItemCopyMatching
(orSecItemDelete
). This is expected behavior for iOS processing and is not a bug.https://developer.apple.com/documentation/security/1542001-security_framework_result_codes/errsecitemnotfound
Therefore, this fix modifies the functions to return
nil
in cases whenerrSecItemNotFound
is returned.