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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:03:22+00:00 2026-05-25T19:03:22+00:00

I’ve had an app that I’ve been working on for a while that I

  • 0

I’ve had an app that I’ve been working on for a while that I originally included Core Data support in, but didn’t actually start trying to use it until recently. Now that I’m actually trying to use Core Data … it doesn’t seem like I can. When I edit my xcdatamodel to include new (or really, any) entities, I can’t seem to actually access those entities in the application itself. Somewhere along the way, I renamed the project from ProjectTest to CoreDataTest, which I suspect is causing or is related to this problem. I haven’t changed any of the default methods which were generated in the app delegate initially by Xcode (initially 3, but now using 4).

So, I’ve created a new entity called simply enough TestEntity with a single attribute (String) TestAttribute.

In my app delegate, I’ve tried a couple of different ways to access the Entity and save a string to it, but all fail. So I thought I’d walk through all entities thinking I was somehow messing up creating the creation of the NSEntityDescription. I put the following code in to show a listing of all Entities … and got nothing:

NSManagedObjectModel *model = [[self.managedObjectContext persistentStoreCoordinator]
                               managedObjectModel];
NSLog(@"List of Entities:");
for (NSEntityDescription *entity in model)
{
  NSLog(@"Entity: %@", entity);
}
NSLog(@"Done with list");

For an output I just get:

2011-09-21 14:58:01.955 CoreDataTest[1813:b603] List of Entities:
2011-09-21 14:58:01.955 CoreDataTest[1813:b603] Done with list

So … I’ve tried cleaning the build. I’ve searched through a lot of questions here on SO and more on google, but I can’t seem to find anything that solves my problem. I don’t get any actual error messages or uncaught exceptions during a run of the app. Any ideas what could be causing it? I’m sure it’s probably something stupidly simple that I’m overlooking …

Thanks for any help,

Will

  • 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-25T19:03:23+00:00Added an answer on May 25, 2026 at 7:03 pm

    Try adding .entities, i.e.:

    for (NSEntityDescription *entity in model.entities) { //...
    

    See The docs for NSManagedObjectModel.

    Also check your model is not null. Try printing it: NSLog(@"%@",model);

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I want to construct a data frame in an Rcpp function, but when I
I am writing an app with both english and french support. The app requests
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
Seemingly simple, but I cannot find anything relevant on the web. What is the

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.