cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

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

H. Yi-Shan
New member | Level 1

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 6

Steve M.
Dropbox Staff

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.)

Steve M.
Dropbox Staff

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

H. Yi-Shan
New member | Level 1

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.

Steve M.
Dropbox Staff

Perhaps you can share some code that exhibits this problem? (If you don't want to share code here, feel free to open a support ticket: https://www.dropbox.com/developers/contact.)

Steve M.
Dropbox Staff

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

H. Yi-Shan
New member | Level 1

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

Thank you Steve.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    H. Yi-Shan New member | Level 1
  • User avatar
    Steve M. Dropbox Staff
What do Dropbox user levels mean?