删除文档Couchbase Lite iOS

时间:2015-12-23 00:34:01

标签: ios couchbase-lite

出于某种原因,当我致电[document delete:&e]时,文档未在couchbase中删除。我的意思是我甚至会检查document.is_deleteddocument.is_gone的值。但出于某种原因,我的文件没有被删除。现在iOS的couchbase lite有错误吗?生病了我的确切代码。

- (BOOL)deleteOldSettingsDocument{

BOOL old_settings_document_deleted = FALSE;
CBLDocument *v1_setting_document = [self v1SettingsDocument];
if(v1_setting_document){
    NSError *e = nil;
    if(![v1_setting_document deleteDocument:&e]){
        NSLog(@"Error deleting old settings document");
        NSLog(@"%@",e.localizedDescription);
    }
    else{
        old_settings_document_deleted = TRUE;
    }
}
return old_settings_document_deleted;

}

0 个答案:

没有答案