Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

H. Yi-Shan's avatar
H. Yi-Shan
New member | Level 1
11 years ago

Can't get snapshot when link to Datastore on other devices

I am an iOS developer of a note-taking app. I tried Datastore to sync notes, which is so fast, that I have faith on it. However I tried to use it with my own database (Core Data) and ran into some problems.

I don't use Datastore as my main database is because I also have an iCloud sync option.

It works fine at first. But later I installed my app on other devices, and after I logged in Dropbox, it does not download the snapshot of the default Datastore, but increments. It kept downloading all the change every second until it became current state. This make the first login or re-login takes a lot of time.

I use observer to watch incoming changes and write them back to my Core Data database, and refresh UI. When user save notes, the change will both save to Core Data and Datastore (call sync:).

I thought it supposed to download the snapshot of tables the first time it link to an account and open the default Datastore. How do I do?

BTW, how do I clear my test account Datastore and tables? It seems like I can't do it from the console.

I really like Datastore's features. And I think it's powerful enough to fit our needs.

Thank you and wish you have a nice holiday.

6 Replies

Replies have been turned off for this discussion
  • Are you using local datastores and then migrating? If so, then syncing can't take advantage of downloading a snapshot, since it needs to merge any local changes with the remote changes. (So it applies each delta one at a time, applying conflict resolution, just as though the app had been linked but offline.)

  • Oh, and as for clearing your account, you'll need to write your own code to delete the datastore(s).

  • H. Yi-Shan's avatar
    H. Yi-Shan
    New member | Level 1
    11 years ago

    No, I don't use local Datastore than merge. I just open the default Datastore. Since I use Core Data as main database, I don't need to use local Datastore.

  • If you can share some code that exhibits the problem, we can investigate.

  • H. Yi-Shan's avatar
    H. Yi-Shan
    New member | Level 1
    11 years ago

    Turned out I put another sync: before the first sync: finish its job.
    Rearranged the code and the problem got solved.

    Thank you Steve.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!