Ios 自定义文件夹中的icloud zip文件未跨设备同步(未使用UIDocument)
我正在尝试复制iCloud中“appname/Documents/”文件夹中的zip文件。我使用NSFileManager复制了该文件Ios 自定义文件夹中的icloud zip文件未跨设备同步(未使用UIDocument),ios,objective-c,zip,icloud,Ios,Objective C,Zip,Icloud,我正在尝试复制iCloud中“appname/Documents/”文件夹中的zip文件。我使用NSFileManager复制了该文件 NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; NSString *ubiqPath = [ubiq path]; NSError *error; [[NSFileManager defaultManager] copyItemAtPa
NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil];
NSString *ubiqPath = [ubiq path];
NSError *error;
[[NSFileManager defaultManager] copyItemAtPath:[DocumentsDirectory stringByAppendingString:@"/Documents.zip"] toPath:[ubiqPath stringByAppendingString:@"/Documents/Documents.zip"] error:&error];
问题是,zip文件没有跨设备同步。fileExistsAtPath:对于第一个设备返回YES,对于第二个设备返回NO。我试着用iPhone和iPad。
另一件重要的事情是,我使用iExplorer浏览了这两个设备,发现zip文件位于这两个设备的“iCloud/appname/Documents/”路径中。这对我来说真的很困惑