Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6987095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:53:34+00:00 2026-05-27T18:53:34+00:00

I am running into an error when I try to turn iCloud sync off

  • 0

I am running into an error when I try to turn iCloud sync off for a UIDocument file. Wondering if anyone else has run into this. Here’s the scenario:

I create a UIDocument file locally in the app sandbox and then make the following call to begin syncing the file with iCloud:

[[NSFileManager defaultManager] setUbiquitous:YES itemAtURL:localPathURL destinationURL:cloudPathURL error:&error];

Everything’s going swimmingly.

Now I want to stop iCloud syncing for this file.

I first make sure that the file has at least been synced with iCloud by calling the following:

- (BOOL) isDataFileSyncedWithCloud
{
    if (![self isICloudSupported] || ![self isUsingICloudForFiles])
        return NO;

    NSURL* file = [self getFileURLToCloudDatafile];
    NSNumber*  isInCloudNum = nil;

    if ([file getResourceValue:&isInCloudNum forKey:NSURLIsUbiquitousItemKey error:nil])
    {
        // If the item is in iCloud, see if it is downloaded and uploaded.
        if ([isInCloudNum boolValue])
        {
            NSNumber*  isDownloadedNum = nil;
            if ([file getResourceValue:&isDownloadedNum forKey:NSURLUbiquitousItemIsDownloadedKey error:nil])
            {
                NSNumber* isUploadedNum = nil;
                if ([file getResourceValue:&isUploadedNum forKey:NSURLUbiquitousItemIsUploadedKey error:nil])
                {                    
                    return ([isDownloadedNum boolValue] && [isUploadedNum boolValue]);
                }
            }
        }
    }

    return NO;
}

The above returns YES, indicating the file has been synced (or so I thought…)

So, now I go ahead and make the call below to stop iCloud syncing for this file:

[[NSFileManager defaultManager] setUbiquitous:NO itemAtURL:localPathURL destinationURL:cloudPathURL error:&error];

and I get the following error: “The operation couldn’t be completed. (LibrarianErrorDomain error 2 – Cannot disable syncing on a unsynced item.)”

Any idea why this error is occurring and how I can get rid of it? I would have thought that my file was fully synced…

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:53:34+00:00Added an answer on May 27, 2026 at 6:53 pm

    I figured it out. To disable iCloud syncing, I was accidentally calling:

    [[NSFileManager defaultManager] setUbiquitous:NO itemAtURL:localPathURL destinationURL:cloudPathURL error:&error];
    

    instead of

    [[NSFileManager defaultManager] setUbiquitous:NO itemAtURL:cloudPathURL destinationURL:localPathURL error:&error];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running into an error when I try to split the dm-observer class into
So Im running into this CACHE error when I try to runserver or syncdb.
I am running into the org.hibernate.LazyInitializationException error when I try to access a lazy
im running into this problem as i try to run a piece of django
I'm running into 'Error: Java heap space, java.lang.OutOfMemoryError: Java heap space' when compiling an
I am running into an error I am having trouble figuring out. I have
I keep running into this error MemCacheError (Broken pipe): Broken pipe on my Rails
I am building a XML RSS for my page. And running into this error:
I'm trying to do some C++ exercises, but I'm running into a error on
Running into a problem where on certain servers we get an error that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.