0
votes

I recently upgraded to the 3.0 Datastore API on iOS, and I noticed that checking for remote changes is a bit different. I'm trying to figure out how to use DBDatastoreStatus's new property incoming but I can't find any examples.

Is this how I would check if there are changes that will be available after the next sync?

__weak DBDatastore *weakStore = self.store;
DBDatastoreStatus *currentStatus;

[weakStore addObserver:weakController block:^(){
  //Like this?
  if(currentStatus.incoming){
    //Do stuff...
  }
}];

It seems like I need to associate the DBDatastoreStatus with the Datastore itself (self.store) somehow.

Thanks in advance for your help.

1

1 Answers

0
votes

I think you just want if (weakStore.status.incoming) { ... }. See https://www.dropbox.com/developers/datastore/tutorial/ios#listeners for an example.