Last active
December 31, 2015 11:39
-
-
Save kuetsuhara/7981525 to your computer and use it in GitHub Desktop.
Couchbase LiteをCBLDodumentで削除
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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