`clear()` throws error on iOS if secure storage is empty
Closed this issue · 2 comments
dennisameling commented
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!
martinkasa commented
Thanks for reporting the issue. It is fixed in v0.8.1 by #69
dennisameling commented
Thank you! Appreciate it 🎉