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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:52:31+00:00 2026-05-13T21:52:31+00:00

I got a question ;) Actually I want to use core-data in different threads.

  • 0

I got a question 😉

Actually I want to use core-data in different threads.
I have two UIviews that display data from the same table in the database.

If a remove an entry in the first view I’m supposed save and then ask the PersistentStoreCoordinator to give me (the UIview) a brain new managed object.
That what they say in the official video “working with core data” on itunesU

With the great messaging system from cocoa I can deal with a basic synchronization. ( I send a ‘has to get new MO’ message )

But how am I supposed to properly save and ‘close’ the DB and then get another managed object.

<### update ###>

I have 2 viewController, one for each of the views I’m deallin with.

If I set up a coredata stack on each of the ViewControllers the data is reachable from each view but no sync.

But if I put a core data stack in the AppDelegate I got an Exception :

*** Terminating app due to uncaught exception 'NSObjectInaccessibleException',
reason: 'CoreData could not fulfill a fault for '0x498f600 <x-coredata:...>'

what should I do ?

<### update ###>

Thanks in advance for any help on this 😉

  • 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-13T21:52:31+00:00Added an answer on May 13, 2026 at 9:52 pm

    Each view is NOT on a separate thread. The entire UI for your application is on ONE thread.

    You do not need to use multi-threading in this situation.

    To create a new object you just need to request one using the class method on the NSEntityDescription object. To delete an object you need to use the -deleteObject: method on the NSManagedObjectContext.

    update

    You should only have one Core Data stack unless you are dealing in a multithreaded environment (your not). Ideally the stack should be created in the Application Delegate and then propagated down to the UIViewController instances. If you are getting an error then you need to solve that error seperately. From the looks of the error you posted, you are retaining/hanging onto a NSManagedObject that has been deleted by Core Data and thus cannot be fulfilled because it is no longer in the store. This is a separate issue from where the stack lives.

    On a side note, it is customary to accept an answer to your question and then post a separate question to be answered.

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can install MySQL on your workstation, it doesn't need… May 14, 2026 at 12:07 am
  • Editorial Team
    Editorial Team added an answer It isn't technology specific but this is a very good… May 14, 2026 at 12:07 am
  • Editorial Team
    Editorial Team added an answer I would suggest adding the names to a custom dictionary… May 14, 2026 at 12:07 am

Related Questions

I'm in the process of trying to hack together the first bits of a
I'm building a game server in Python and I just wanted to get some
I've been toying with the idea of building a web-based Roguelike game using Silverlight
Suppose I have a number of related classes that all have a method like
I got a similar problem to this guy while processing 4MB log file. Actually

Trending Tags

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

Top Members

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.