Remove item from iCloud - "Cannot disable syncing on a unsynced item."

1.1k views Asked by At

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]);
        }
    });
});
1

There are 1 answers

1
Christian Beer On BEST ANSWER

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?