iOS上的Dropbox数据存储API内部错误:断言失败

时间:2014-07-09 19:41:50

标签: ios dropbox-api

我正在尝试从任何视图控制器创建一个设置数据存储区观察器的全局方法。

我这样称呼方法:

//SomeViewController.m
- (void)viewWillAppear:(BOOL)animated {
  [super viewWillAppear:animated];

  [[PPDropboxSync sharedDropboxSync] listenForDropboxChangesInController:self];
}

..它执行如下:

//PPDropboxSync.m
-(void)listenForDropboxChangesInController:(id)controller
{
  if([self isDropboxLinked]){
    //Get the dropbox datastore session
    [self openDatastore];

    __weak typeof(controller) weakController = controller;
    __weak DBDatastore *weakStore = self.store;

    [weakStore addObserver:weakController block:^(){

      if(weakStore.status & DBDatastoreIncoming){
        //The sync returns a dictionary of affected tables, each with a collection of changed records
        NSDictionary *changes = [weakStore sync:nil];

        //Process changes...

      }
      //Update sync time
      [self updateSyncTime];
    }];        
  }
}

我在这一行收到错误:NSDictionary *changes = [weakStore sync:nil];

...说:

  

[ERROR]错误:DROPBOX_ERROR_INTERNAL:database.cpp:317:database.cpp:317:断言失败:记录   断言失败:(!"记录"),函数apply_changes,文件/ws/syncsdk/common/ssync/database.cpp,第317行。

有什么想法吗?

0 个答案:

没有答案