with:
await AsyncStorage.clear();
I'm getting this in ios:
unhandled promise rejection failed to delete storage directory
found this:
https://stackoverflow.com/questions/46736268/react-native-asyncstorage-clear-is-failing-on-ios
switched to use this instead:
await AsyncStorage.getAllKeys().then(AsyncStorage.multiRemove)
but that causes unhandled promise rejection in android.
this is working:
Platform.OS === 'ios' ? await AsyncStorage.getAllKeys().then(AsyncStorage.multiRemove) : await AsyncStorage.clear()