问题
NSString *filename = @"NotesDBNew.sqlite"; //File name in DropBox
NSString *destDir = @"/"; //Destination path in DropBox
NSString *fromPath = @"..."; //local path to your DB file
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docsPath = [paths objectAtIndex:0];
fromPath = [docsPath stringByAppendingPathComponent:@"NotesDBNew.sqlite"];
for (DBMetadata *child in metadata.contents) {
// NSString *folderName = [[child.path pathComponents] lastObject];
if ([child.filename isEqualToString:filename]) {
NSLog(@"%@",child.filename);
NSString *strqwe=child.rev;
[[self restClient] uploadFile:filename toPath:destDir withParentRev:strqwe fromPath:fromPath];
}
}
来源:https://stackoverflow.com/questions/23148259/dropbox-keeps-creating-conflicted-copies-ios-sdk-core-api