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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:32:55+00:00 2026-06-16T02:32:55+00:00

I installed RestKit (0.20.0-pre3) via CocoaPods and configured it as the documentation states it.

  • 0

I installed RestKit (0.20.0-pre3) via CocoaPods and configured it as the documentation states it. When performing the getObjectsAtPath and RestKit does the mapping I get:

* Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[NSManagedObjectContext saveToPersistentStore:]: unrecognized selector sent to instance 0x9eaae40’

If I set a breakpoint it stops at RKManagedObjectRequestOperation.m at line 278.

I configured RestKit as follows:

- (void)configureRestKit{

    //initialize RestKit
    LLog(DEBUG_LEVEL, @"init RestKit");

    NSString *baseURL;

    // Log all HTTP traffic with request and response bodies
    //RKLogConfigureByName("RestKit/Network", RKLogLevelTrace);

    // Log debugging info about Core Data
    RKLogConfigureByName("RestKit/CoreData", RKLogLevelTrace);

    //Loging about the Entity Mapping
    RKLogConfigureByName("RestKit/ObjectMapping", RKLogLevelTrace)

    // enable activity indicator
    [AFNetworkActivityIndicatorManager sharedManager].enabled = YES;

    if (local) {
        baseURL = @"http://xyz.net";

    } else {
        baseURL = @"http://XYZ.net";
    }


    [RKMIMETypeSerialization registerClass:[RKNSJSONSerialization class] forMIMEType:@"application/json"];

    _objectManager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:baseURL]];

    _managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil];
    _managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:_managedObjectModel];

    NSString *path = [RKApplicationDataDirectory() stringByAppendingPathComponent:@"XYZ.sqlite"];
    //LLog(DEBUG_MODE,@"The object store: %@", _objectStore.description);

    [_managedObjectStore addSQLitePersistentStoreAtPath:path fromSeedDatabaseAtPath:nil withConfiguration:nil options:nil error:nil];

    [_managedObjectStore createManagedObjectContexts];
    [_managedObjectStore createPersistentStoreCoordinator];

    _managedObjectContext = _managedObjectStore.persistentStoreManagedObjectContext;
    _persistentStoreCoordinator = _managedObjectStore.persistentStoreCoordinator;
    _managedObjectModel = _managedObjectStore.managedObjectModel;

    _objectManager.managedObjectStore = _managedObjectStore;

    // 2012-06-13T00:00:00+01:00
    NSDateFormatter *dateFormatter = [NSDateFormatter new];
    [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss'+01:00'"];
    dateFormatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"];
    dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];

    // Set it Globally
    [RKObjectMapping setPreferredDateFormatter:dateFormatter];

    LLog(DEBUG_LEVEL, @"DateFormater Test: %@", [dateFormatter stringFromDate:[NSDate date]]);

    // Add Entity Mapping
    RKEntityMapping *experienceMapping = [RKEntityMapping mappingForEntityForName:@"Experience" inManagedObjectStore:_managedObjectStore];
    [experienceMapping addAttributeMappingsFromArray:@[@"experienceid", @"city", @"descr", @"lat", @"lng", @"number", @"price", @"street"]];
    experienceMapping.identificationAttributes = @[@"experienceid"];


    NSIndexSet *statusCodes = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful); // Anything in 2xx
    RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:experienceMapping pathPattern:@"/test.json" keyPath:@"experience" statusCodes:statusCodes];
    [_objectManager addResponseDescriptor:responseDescriptor];




    // ######  ONLY FOR TEST REASONS ######

    NSManagedObject *test = [NSEntityDescription
                                       insertNewObjectForEntityForName:@"Experience"
                                       inManagedObjectContext:_managedObjectContext];
    [test setValue:[NSNumber numberWithInt:1] forKey:@"experienceid"];
    [test setValue:@"Testville" forKey:@"city"];

    NSError *error;
    if (![_managedObjectContext save:&error]) {
        NSLog(@"Whoops, couldn't save: %@", [error localizedDescription]);
    }

    [_objectManager getObjectsAtPath:@"/test.json" parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
     // Handled with articleDescriptor
        LLog(DEBUG_LEVEL, @"Test");
     } failure:^(RKObjectRequestOperation *operation, NSError *error) {
     // Transport error or server error handled by errorDescriptor
     }];


}

Thanks for your help!

  • 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-16T02:32:56+00:00Added an answer on June 16, 2026 at 2:32 am

    This most likely indicates that your linker flags are not set up properly. The -ObjC linker flag is required to get category methods loaded. Have you overridden the Linker Flags on your target? You need to at least include $(inherited) if you have additional configuration on the target level. You should see -ObjC appear within your linker flags when viewing the setting in Xcode.

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

Sidebar

Related Questions

Installed Google App Engine 1.2.5 and Web Toolkit 1.7.1 . However I still get
Installed node-inspector via npm install -g nodeinspector. I can get to the dashboard but
I installed clojure-mode and slime using the emacs starter kit and I get this
Installed Git and created heroku account for use with a facebook app unable to
I installed DiffMerge in Applications folder. I can't get DiffMerge run on its own,
I installed Sija's fork of garb and am having some issues. The documentation appears
I installed SVN on a Ubuntu machine and I can't get my head around
I installed FFMPEG using apt-get. It comes by default compiled with some options: configuration:
I installed integrity app these days. and found some issues. I follow this. $
I'm having problem to use RESTKIT. I have installed everything perfectly, I have been

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.