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 7802279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:12:59+00:00 2026-06-02T01:12:59+00:00

I’m working on an app that uses Core Data and iCloud to sync data

  • 0

I’m working on an app that uses Core Data and iCloud to sync data between multiple iPads. This is all working fine and I can add data to each iPad and it will sync between them all.

I have a Core Data sqlite file that is pre-populated with a list of countries and I want to copy this to the documents area on first run of the app. I had this working but have changed my persistentStoreCoordinator implementation to test for iCloud support or not and a couple of other small changes.

However now when I check to see if the sqlite file exists and copy the pre-populated sqlite file if it doesn’t I get the following error at

[psc addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:[NSURL fileURLWithPath:iCloudData] options:options error:&persistentStoreError];

NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:: CoreData: Ubiquity: An error occured while setting up the ubiquity integration: Error Domain=NSCocoaErrorDomain Code=134316 “The ubiquity container does not appear to match this persistent store, it is possible this is caused by switching to a different iCloud account, or logging out of iCloud entirely. The store should be re-opened with read-only attributes or removed from iCloud syncing permanently.” UserInfo=0x1cb590 {storeUUID=31381598-EAFA-4550-9B96-F501800974D5, containerUUID=E3A8DC7D-41FD-405A-8D8A-C06C8B467CA2, NSLocalizedDescription=The ubiquity container does not appear to match this persistent store, it is possible this is caused by switching to a different iCloud account, or logging out of iCloud entirely. The store should be re-opened with read-only attributes or removed from iCloud syncing permanently.}

Is this because there are still references in iCloud to a different Core Data sqlite file or transaction log files? If so how would I remove them?

  • 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-06-02T01:13:01+00:00Added an answer on June 2, 2026 at 1:13 am

    You’re not supposed to copy a pre-created Core Data store to the ubiquity container. The old way to do this was to create an SQLite file on the Simulator/device/computer and copy it into it’s place on first run. If you use iCloud, you can’t do this any more. iCloud works by each device receiving a list of changes as “transaction logs”, which it then applies to it’s own SQLite store. It needs to know what’s changed, and getting a .sqlite file in one lump won’t tell it that.

    The iCloud way to do this is either:

    • Create the initial data from inside your code (e.g. an insertStartData: method). You could add it from a plist, or whatever you like. You’ll have to check that the data isn’t already there first.
    • Use NSPersistentStoreCoordinator‘s migratePersistentStore:toURL:options:withType:error to copy your initial store across.

    Here’s the docs:

    You should not seed initial content with a prepackaged database file. Instead, you should create the default items in code, or use NSPersistentStoreCoordinator’s migratePersistentStore:toURL:options:withType:error: method to migrate a prepackaged database to the required location.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.