Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does react-native AsyncStorage persist between playstore updates?

Tags:

react-native

I can't find anything about this.

I need a way to persist data between app updates on the play store and I'm not sure if the AsyncStorage does the job. I assume it does, since on every build I perform, the data is there.

But I'm not sure about different versioning in the store. If it doesn't, how could I handle this?

Thank you.

like image 378
fgarci03 Avatar asked Jun 27 '16 17:06

fgarci03


1 Answers

Yes, the AsyncStorage keeps the data between updates like if you had had a database. For Android, AsyncStorage data is stored in a database that is linked to your package id and doesn't get deleted unless the app is uninstalled. AsyncStorage should be enough for you. From RN docs:

On iOS, AsyncStorage is backed by native code that stores small values in a serialized dictionary and larger values in separate files. On Android, AsyncStorage will use either RocksDB or SQLite based on what is available.

like image 186
Hlynur Freyr Jónsson Avatar answered Oct 20 '22 15:10

Hlynur Freyr Jónsson