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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:45:11+00:00 2026-05-15T15:45:11+00:00

I am trying to use two different Core Data Models in a iPhone application,

  • 0

I am trying to use two different Core Data Models in a iPhone application, I created and correctly set up the first Core Data Model that uses SQLite as persistent object store. This one works very well and the pre-populated default store loads correctly in a Table View.

Now I want to create a different Core Data Model with a different pre-populated SQLite default store to load it in a different Table View in the same iPhone application.
How can I do this task? I read the Core Data documentation and downloaded the sample codes but I did not find anything about this task.

Any sample code useful to solve this problem will be appreciated.

Thank you in advance,
Pier

  • 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-15T15:45:11+00:00Added an answer on May 15, 2026 at 3:45 pm

    You can do it two different ways:

    • You can set up a separate entire core data stack, effectively just copying the template code you already have in your AppDelegate.

    • You can add the second Core Data sqlite file into the existing core data stack. This will let you access both Entities (not tables, this is an object graph not a database) in the same stack. To do that you add a second -addPersistentStore... call in your -persistentStoreCoordinator method and make sure your -managedObjectModel method is doing a merge of the models in your bundle.

    Update

    Set it up anywhere you want. You can set it up in the AppDelegate and then do a dependency injection and push down the second stack to whoever needs reference to it.

    Generally I would not create the stack in the UIViewController as it is not its responsibility.

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

Sidebar

Ask A Question

Stats

  • Questions 490k
  • Answers 490k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I hope this helps. Can you give a comprehensive definition… May 16, 2026 at 9:55 am
  • Editorial Team
    Editorial Team added an answer I think Turbogears suffers a bit from being a little… May 16, 2026 at 9:55 am
  • Editorial Team
    Editorial Team added an answer HTML: <input type="text" name="name" id="uniqueID" value="value" /> JS: var nameValue… May 16, 2026 at 9:55 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm trying to use two different methods of connecting to a database to edit
I'm creating a simple Navigation-based app using core data for my iPhone and I'm
Right now I am trying to use selenium ide to write code that makes
I am trying to create a WCF Streaming Service. I have two requirements that
I've been trying to migrate a fairly large web application from IIS6 to IIS7
I'm trying to override a property in a base class with a different, but
I am trying to find how many days are between two dates. I have
I am trying to make a simple program that handles files and directories, but
Previously I've written some very simple multithreaded code, and I've always been aware that
I've been toying around, writing a small IRC framework in C that I'm now

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.