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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:45:59+00:00 2026-05-27T11:45:59+00:00

My iPhone app currently uses Core Data to save Growth Entries created by the

  • 0

My iPhone app currently uses Core Data to save Growth Entries created by the user. I’m trying to add a .sqlite file to the app that stores average growth data so that I can use Core Plot to show the user how their growth compares to the average.

  • My app is working perfectly for storing and retrieving the user’s data.
  • I have written a utility app that creates a .sqlite file containing the average data
  • I have copied the average growth data class files, the data model, and the .sqlite file into my main app.

Note: The average data does not need to be writable.

After much searching of Stack Overflow and countless Googles, I have come to the conclusion that what I want to do is implement two PersistentStoreCoordinators: one for the user entered data (readwrite), and one for the average data (readonly). Is that the best course?

If so, I don’t know where to start. Currently, my Core Data Stack methods are in my AppDelegate.m (where Xcode put them). It feels like I should move them into a better place if I’m going to add much to them, but I don’t know where that better place might be. And besides that, I don’t know where I should start trying to add the new persistent store.

Thanks for the help!

Edit for clarification:
If my suggestion of creating two PersistentStores is the right route, how do I do that? If it’s not the best route, what should I do?

  • 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-27T11:45:59+00:00Added an answer on May 27, 2026 at 11:45 am

    I have solved my problem. Here is what I did:

    • create a data model for the second database
    • in the appDelegate method managedObjectModel:, add code to merge the two models (NSManagedObjectModel modelByMergingModels:)
    • in the appDelegate method didFinishingLaunchingWithOptions:, add code to determine if the database already exists. If it does not exist, generate the data.

    NOTE: you do not need to create the database before generating the data. That will be done for you automatically when you create a new entity.

    The only downside for me is that I haven’t found a way to prevent overwriting the data in the “second” database. But I’m still looking for a solution to that.

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

Sidebar

Related Questions

My iPhone app currently uses core data. I want to create an online database
What's the best design to use in an iPhone app that uses core data
My iphone app uses a SQLite database to store data. I have a table
I have core data configuration in my iPhone app, and how I'm currently passing
I'm currently upgrading an older iPhone flashcard application that uses two SQLite dbs (one
I'm currently developing an iPhone App that uses Phonegap and HTML5. I use localstorage
I currently have an iPhone app in the iTunes app store that uses a
I'm currently building an iPhone app that will display data from an NSMutableArray called
Our iPhone app code currently uses NSURLConnection sendSynchronousRequest and that works fine except we
I have an IPhone app that uses webservices to get data from a server.

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.