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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:17:30+00:00 2026-05-31T22:17:30+00:00

I have an old Xcode project which contains a CoreData model (containing a version

  • 0

I have an old Xcode project which contains a CoreData model (containing a version 1 and version 2 of the model). For several reasons I need to create a new Xcode project and transfer all of the code to the new project.

How can I import/transfer my old CoreData model in such a way that this new binary will still be able to read, and potentially migrate, the existing CoreData stores which are on my existing users’ iPhones and iPads out in the world? I worry that if I push a new version using this new project that my users will update their app to the newest version and then it’ll crash because the model or model version numbers don’t match.

I’m NOT talking about adding a new version to the data model within the same app. I understand that process. This is about moving/importing/etc an existing data model from an old project into a new project.

Should I just copy the files over and add them to my project manually? Do I need to change things in my build settings to account for it?

  • 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-31T22:17:32+00:00Added an answer on May 31, 2026 at 10:17 pm

    In the end, this is how I solved it:

    1. Create new project with CoreData
    2. Copy the raw CoreData model file over into my new project. Add it to the project.
    3. Delete the empty CoreData model autocreated by the new project.
    4. In the Project Settings, under Build Phases, Compile Sources, I added the copied CoreData model file.

    Then I used the code that Scott provided above:

    [NSManagedObjectModel mergedModelFromBundles:nil]
    

    which automatically finds all of the models and combines them. By deleting the auto-generated one and adding my transferred one then everything works out just fine.

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

Sidebar

Related Questions

I have just installed new xcode with sdk 4.3b because I need 'airPlay' feature
I have created a new iPhone project in Xcode 4 and added some files
I have a lot of warnings in my Xcode project about old files that
I have old code that uses size_t which IIRC comes from cstring.h. On OS
Most of the software company have old software which continue maintain, and they also
I have a old website that generate its own RSS everytime a new post
I have several old 3.5in floppy disks that I would like to backup. My
I have an old server with a defunct evaluation version of SQL 2000 on
I have some old rrdtool databases, for which the exact creation recipe has long
We have an old project written using Managed C++ syntax. I would like to

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.