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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:51:22+00:00 2026-06-16T00:51:22+00:00

Recently I started learning CoreData. Figured out how to create a database, create a

  • 0

Recently I started learning CoreData.
Figured out how to create a database, create a table (Event) and add the data.
Clear with this. Now the problem.
In my project, there are several classes.
All database activities (creating / filling), I am doing in the first class (myProject.h / myProject.m)
Now I want to get the data on request in a different class (myProjectOtherClass.m)
How can I do this?
I understand how to do it in class myProject.m, but how to do it in myProjectOtherClass.m?

  • 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-16T00:51:24+00:00Added an answer on June 16, 2026 at 12:51 am

    I assume that you have imports for your entities (TableNames) in myProject.h / myProject.m to see the attributes of these data entries.You should import the required data entity also in other classes where you want to use them, insert delete etc.

    You need to create new instances of NSManagedObjectContext for fetching results or inserting new entities and for that purpose you need a property on persistence store variable(NSPersistentStoreCoordinator).It shows you where your store is located.In simpliest case if you have created the project using CoreData template of Xcode, they all reside in AppDelegate so you can make it visible outside of AppDelegate with a property.

    UPDATE :
    Or alternatively you can also put a property on a single MOC in AppDelegate and use it for every single Core Data operation

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

Sidebar

Related Questions

I have recently started learning Silverlight and can't figure out how make this work.
I recently started learning unix and I am trying out some simple programs related
I've recently started learning/using django; I'm trying to figure out a way to have
I recently started learning C# and im stuck with a gridview and database .
I recently started learning about developing in android and now I'm getting an error
I've recently started learning XS using perlxstut and the tutorial suggests that I create
I recently started learning Scala and started a little project to create a simple
I recently started learning Objective-C, and I am working on an iOS app as
I recently started learning backbone and was wondering what would be the best way
I recently started learning JavaFX. At the moment I can't build any JavaFX project

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.