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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:14:46+00:00 2026-06-17T19:14:46+00:00

I am changing my app from using a purely remote DB to pulling the

  • 0

I am changing my app from using a purely remote DB to pulling the remote DB into a local DB. I am getting this Error when I am trying to get an Array of Objects from the remote database.

CoreData: error: Failed to call designated initializer on NSManagedObject class 'Class'

I am not sure what I am doing wrong. Here is my restkit setup.

RKObjectManager *manager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://fake.herokuapp.com"]];
  NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"App" withExtension:@"momd"];
  NSManagedObjectModel *managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
  RKManagedObjectStore *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel];
  manager.managedObjectStore = managedObjectStore; 

  RKEntityMapping *classMapping = [RKEntityMapping mappingForEntityForName:@"Class" inManagedObjectStore:managedObjectStore]; 
  [classMapping        addAttributeMappingsFromDictionary:[Class      propertyMappings]];

  NSIndexSet *statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); 
  RKResponseDescriptor *classDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:classMapping pathPattern:@"/class.json" keyPath:@"" statusCodes:statusCodes];
  [manager addResponseDescriptorsFromArray:@[classDescriptor]];
  [managedObjectStore createManagedObjectContexts];
   managedObjectStore.managedObjectCache = [[RKInMemoryManagedObjectCache alloc] initWithManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext];
  [RKObjectManager setSharedManager:manager];

And here is the request I am making, where it fails ( i think on the response).

    [manager getObjectsAtPath:@"class.json" parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult){
    NSLog(@"Success");

    }failure:^(RKObjectRequestOperation *operation, NSError *error) {}];

If you need anything else just let me know.
And if you could help out I will be a very happy developer.

Thank you,

-DO

EDIT

This is what propertMappings returns

+ (NSDictionary *) propertyMappings{return @{@"id" : @"iD", @"name" : @"name", @"image_url" : @"image_url"};}
  • 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-17T19:14:47+00:00Added an answer on June 17, 2026 at 7:14 pm

    Well the problem was actually that the Entity I was trying to pull in was nested through a few relationships in my model so it wasn’t the parent. It was causing an error. I had to adjust my api a little bit and everything worked.

    Thanks for your help.

    -DO

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

Sidebar

Related Questions

I am using AFNetworking to connect from an iOS v6.0 app to my local
I am trying to take a picture from my iPad app, using code I
Am getting the device local currency symbol by using this code. NSLocale *theLocale =
I am getting a casting error. My app is reading a text file from
i'm studying wp7 app changing app on https://github.com/slodge/face . I want to change this
When changing the selected item in a ListBox, I'm getting a weird error where
I've got a wxPython app that I made into an app using py2app. It's
I am trying to setup a Rails app on Heroku using PG, and also
i am reading the string of MediaStore.Images.Media.DATA from an ArrayList into an array so
I'm doing QA on this new app I've created using CI. With pagination implemented,

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.