At the beginng of my app, i want to delete a few items from iCloud permanently.
But in any case, the console tells me "Cannot disable syncing on a unsynced item."
dispatch_async(globalQueue, ^(void) {
NSFileManager *fileManager = [[NSFileManager alloc] init];
NSError *error = nil;
// Move the file.
BOOL success = [fileManager setUbiquitous:NO itemAtURL:removeItemURL
destinationURL:dest error:&error];
dispatch_async(dispatch_get_main_queue(), ^(void) {
if (! success) {
NSLog(@"MEGA ERROR %@", [error userInfo]);
}
});
});
It seems the file you want to remove from ubiquity is not there. That's what the error message says. Did you check (via NSMetadataQuery) if the file is in the iCloud?