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

The Archive Base Latest Questions

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

The Background A Cocoa Non Document Core Data project with two Managed Object Models.

  • 0

The Background

  • A Cocoa Non Document Core Data
    project with two Managed Object
    Models.
  • Model 1 stays the same. Model
    2 has changed, so I want to migrate
    the store.
  • I’ve created a new version
    by Design > Data Model > Add Model
    Version in Xcode.
  • The difference between versions is a single relationship that’s been changed from to a one to many.
  • I’ve made my
    changes to the model, then saved.
  • I’ve made a new Mapping Model that
    has the old model as a source and new
    model as a destination.
  • I’ve ensured
    all Mapping Models and Data Models
    and are being compiled and all are
    copied to the Resource folder of my
    app bundle.
  • I’ve switched on migrations by
    passing in a dictionary with the
    NSMigratePersistentStoresAutomaticallyOption
    key as [NSNumber
    numberWithBool:YES]
    when adding the
    Persistent Store.
  • Rather than merging
    all models in the bundle, I’ve specified the two
    models I want to use (model 1 and the
    new version of model 2) and merged
    them using modelByMergingModels:

The Problem

No matter what I do to migrate, I get the error message:

“Persistent store migration failed,
missing source managed object model.”

What I’ve Tried

  • I clean after every single build.
  • I’ve tried various combinations of
    having only the model I’m migrating
    to in Resources, being compiled, or
    both.
  • Since the error message
    implies it can’t find the source
    model for my migration, I’ve tried
    having every version of the model in
    both the Resources folder and being
    compiled.
  • I’ve made sure I’m not
    making a really basic error by
    switching back to the original
    version of my data model. The app
    runs fine.
  • I’ve deleted the Mapping
    Model and the new version of the
    model, cleaned, then recreated both.
  • I’ve tried making a different change
    in the new model – deleting an entity
    instead.

I’m at my wits end.

I can’t help but think I’ve made a huge mistake somewhere that I’m not seeing. Any ideas?

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

    Two possibilities:

    1. Your source model in your app does not match the actual store on disk.
    2. Your mapping model does not match your source model.

    Turn on Core Data debugging and you should be able to see the hashes that Core Data is looking for when it is doing the migration. Compare these hashes to what is in your store on disk and see if they match up. Likewise the debugging should let you see the hashes in the mapping model to help you match everything up.

    If it is just your mapping model that is misaligned, you can tell it to update from source from the design menu in Xcode. If you are missing the actual source model for your store file on disk then you can look in your version control system or try using an automatic migration to get that file to migrate to the model that you believe is the source.

    Update 1

    The location for changing the source and destination models has moved to the bottom of the editor window:

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

Sidebar

Related Questions

In my code I am storing an image into my Core Data model (works
The above is a UITableViewCell containing two UILabels. The cell has a transparent background
I am building a Cocoa Mac application that runs in the background but has
Background I want to access the cache of Chrome and Firefox in my Cocoa
I am coming from iOS background and starting to learn Cocoa. On iOS unless
Is there a way to alter the standard background and text colors in cocoa
Background: We're building an application that allows our customers to supply data in a
How do I create a Cocoa app that runs in the background (not in
I'm new on Cocoa OBJC and iPhone dev. Where to find the default background
Background I have a MacAlly IceKey keyboard. This keyboard has volume buttons that require

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.