Skip to content

Instantly share code, notes, and snippets.

@kuetsuhara
Last active December 31, 2015 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuetsuhara/7981525 to your computer and use it in GitHub Desktop.
Save kuetsuhara/7981525 to your computer and use it in GitHub Desktop.
Couchbase LiteをCBLDodumentで削除
- (void)deleteDocument:(NSString *)documentId{
// AppDelegateを呼ぶ
NSError *err;
AppDelegate *ap = ApplicationDelegate;
CBLDocument* doc = [ap.database documentWithID:documentId];
// 削除実行
if (![doc deleteDocument:&err]) {
[self showErrorAlert:@"Couldn't delete the item"];
}
else{
NSLog(@"Delete Complete!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment