capacitor-secure-storage-plugin
capacitor-secure-storage-plugin copied to clipboard
`clear()` throws error on iOS if secure storage is empty
When the Keychain is already empty and then calling SecureStoragePlugin.clear()
on iOS, it throws an error:
⚡️ To Native -> SecureStoragePlugin clear 101871643
⚡️ [error] - {"message":"error","errorMessage":"error"}
This is inconsistent with Android, which simply returns true
if the Secure Storage was already empty.
I'd expect this method to simply return true
if the Keychain was already empty. Throwing an error suggests that something went wrong in the removal process, which is not the case.
Would it be possible to either:
- Add something to the documentation that mentions this iOS-specific behavior
- Or let iOS return
true
ifSecureStoragePlugin.clear()
is called if the Keychain is already empty
Thanks in advance!