Replies: 2 comments
-
Any solutions? |
Beta Was this translation helpful? Give feedback.
-
@panda0603 I'm wondering the same thing. But similarly to what you mentioned, a work-around would be to just do a Alternatively, it looks like AsyncStorage uses SQLite (based on OS) under the hood, so you could consider using that and then backing up the db file: Here is a link to database backup exclusion also for reference (AsyncStorage disables that feature by default, which is likely desirable for a manual backup as well): |
Beta Was this translation helpful? Give feedback.
-
You want to:
Hello,
I am creating a journal app.
I want to enable users to backup their data manually by clicking 'backup' button, which will create a db backup file.
Upon reinstalling the app, users should be able to restore their data by importing the db backup file.
Would this be possible? I've already seen posts about using Gdrive and ICloud, but this is automatic. I wish to export and import the db file of AsyncStorage manually. For example, expecting API something like AsyncStorage.createDbFile or equivalent.
Alternative would be to JSON.stringify all the data in AsynStorage and put that on a txt file and export that, but I don't think this is a good idea ( or is it perfectly fine to do this?)
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions