简体   繁体   中英

Parse: Is it possible to prefill local datastore?

We use Parse local datastore so we can fetch update from Parse. We would however like to prefill the local datastore with all the object from Parse before shipping it.

This ensure that if a user downloads the app, and then launches it without internet connection, he will still have the objects.

Thanks

(not tested, just a theory)

You could export your data set as JSON and embed that into your app, then, when the app starts up you could import that and pin the objects.

Note that all the objects would be dirty so you should be careful with any local editing you do and you should really fetch the data from the server when you can.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM