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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:26:00+00:00 2026-06-06T17:26:00+00:00

I am currently working on an iPhone app which uses CoreData to save some

  • 0

I am currently working on an iPhone app which uses CoreData to save some Objects persistently.

To make my point clear I want to give you a short introduction into the scenario:

I have some Data which I query from the Internet. I save this data in an object called MyData and use it where I need it. When the data is used I want to save it persistently so I save it to a MyManagedData object.

I really don’t like this solution for saving data. Because I have two classes saving exactly the same data, but one is managed by CoreData.

Is there a way to instantiate managed objects without saving them automatically to CoreData? So I can just have MyManagedData objects and save just a bunch of them? How do you construct such things?

Greetings

  • 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-06T17:26:02+00:00Added an answer on June 6, 2026 at 5:26 pm

    One viable approach is to have two managed object contexts. You’re already using a context for your main persisted data, so you could create a new context for your ‘scratch’ data which you never save.

    There’s a few articles out there on the subject, such as http://www.timisted.net/blog/archive/multiple-managed-object-contexts-with-core-data/.

    I’ve been using InnerBand to help with CoreData. It’s simplified my code quite a bit and not got in the way.

    If you use InnerBand, creating a temporary context/store for storing transient entities (not saved) should just be a case of doing the following:

    // note - not calling [CoreDataStore mainStore] here --
    // we use that for persisted main data
    self.temporaryStore = [CoreDataStore createStore]; 
    
    // and then create temporary entities like so:
    MyEntityClass *myEntity = [MyEntity createInStore:self.temporaryStore];
    

    Obviously, you should never call [self.temporaryStore save], as it is for transient data only.

    Note: I’ve not tried the above strategy myself yet, but I believe it to be workable.

    N.B. on a related issue, I’m also using mogenerator which takes the pain out of generating entity classes (and prevents clobbering of custom code you may have added to your entities classes when you regenerate the entity classes).

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

Sidebar

Related Questions

I'm working in small app for iPhone which uses openGL. The app is supposed
i'm currently working on iphone app which has a web view. i'm pulling a
I'm currently working on a concept for a new iPhone app, the would involve
Possible Duplicate: Programmatically delete my own app Currently I am working on a iphone
I'm working on an audio-intensive app for the iPhone. I'm currently calling a number
I am currently working with an IPhone API which consist of about 40 pages
I'm currently working on an iPhone app and I have a library from a
I'm currently working on converting an Android app I built natively as an iPhone
I am working on an iOS app which make a movie using array of
I am working on an iPhone app which needs a scroll view that populates

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.