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

  • SEARCH
  • Home
  • 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 6850889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:10:48+00:00 2026-05-27T01:10:48+00:00

I want to sync my Core Data shoebox app with iCloud. An example project

  • 0

I want to sync my Core Data shoebox app with iCloud. An example project Apple provides shows how to set up the NSPersistentStoreCoordinator to enable iCloud. The code roughly looks like this:

persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel: [self managedObjectModel]];

NSDictionary* options = [NSDictionary dictionaryWithObjectsAndKeys:@"com.company.app", NSPersistentStoreUbiquitousContentNameKey, cloudURL, NSPersistentStoreUbiquitousContentURLKey,nil];

[psc addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:options error:&error]);

The problem is: if there’s data already stored in iCloud, this method takes forever to return the persistentStoreCoordinator. If I do it synchronously I’m watching a blank screen for a few minutes, if I do it asynchronously my app is completely unusable because I can’t interact with Core Data.

Surely there’s a way I could add the persistent store as I would without iCloud, and then let iCloud work asynchronously?

Basically, my question is, what is iCloud doing during the time it takes to initially sync and can I have my persistentStoreCoordinator first, and let the data sync in the background?

  • 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-27T01:10:49+00:00Added an answer on May 27, 2026 at 1:10 am

    When you use iCloud to sync Core Data you need to load the store on a separate thread. Take a look at:

    https://devforums.apple.com/thread/126670

    That demonstrates asynchronous loading of the store.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As the title tells,i want to sync my core data os x lion app
I want to sync core data between applications which have different Bundle ids but
My iPhone app currently uses core data. I want to create an online database
I'm building an client/server-app where I want to sync data. I'm thinking about including
I want to sync the Core Data on iPhone with MongoDB on Sinatra server.
I want sync data from iphone to the webs server. My question is how
I have an Android app with a sqlite db. I want to sync the
I want to sync/copy a single project out of a moderate large SVN repo
I am working on an iphone game app. I dont want to use core
I want to make an app...that can sync my iphone calender with google calendar..i

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.