Integrating seed DB with Parse local datastore

338 Views Asked by At

We are developing an app for both iOS and Android. In both the platforms we are not using the native DB (i.e., in iOS core data and in Android sqlLite). Instead of native DB we are using Parse local datastore.

In Parse we are going to keep huge amounts of static content. When user’s install the app for the first time, we don’t want all the contents from Parse to be downloaded. Because it may take some time to download the contents from DB.

So we have decided to use the seed database concept. This will not take much time. It will be a good user experience.

Our question is how we can use the seed DB concept with the Parse local datastore. Because it is not possible to identify where Parse is storing the local datastore in iOS/Android. Also, we hope when the app installs for the first time from the store, Parse will create a new local datastore. So how shall we sync the huge contents initially to the Parse local datastore.

Can anyone give a suggestion for integrating seed DB with Parse local datastore.

1

There are 1 best solutions below

2
On

Your best bet here is to seed your app with a Core Data database, then synchronize the Core Data to Parse incrementally. Essentially, you would start with a Core Data database on the initial load and slowly transition to using Parse directly, or alternatively, you could use the Core Data as your primary connection and have it sync with parse as needed, like so:

UI/Local Controller <==> Core Data <==> Parse.com

This is too big a question to give a full code example, but I can point you in the right direction with a solid framework build specifically to do this job:

https://github.com/8020world/FTASync