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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:06:20+00:00 2026-06-11T16:06:20+00:00

The following code produce this error. – (void)viewDidLoad { RKObjectManager * manager = [RKObjectManager

  • 0

The following code produce this error.

- (void)viewDidLoad
{
  RKObjectManager * manager = [RKObjectManager objectManagerWithBaseURLString:@"http://localhost:3000"];
  RKObjectMapping *contactMapping = [RKObjectMapping mappingForClass:[Contact class]];
  [contactMapping mapKeyPathsToAttributes:
      @"nom", @"nom",
      @"prenom", @"prenom",
      @"telephone", @"telephone",
      @"commentaires", @"description",
      nil];
  [manager.mappingProvider setMapping:contactMapping forKeyPath:@"/contacts.json"];
  [manager loadObjectsAtResourcePath:@"/contacts.json" delegate:self];
}

I don’t know how to match the ressource path with the mapping. Any idea ?

The logs are :

2012-09-18 11:07:30.811 MyApp[28507:fb03] I restkit:RKLog.m:33 RestKit initialized...
2012-09-18 11:07:30.816 MyApp[28507:fb03] mapping : <RKObjectMappingProvider: 0x6c1c860>
2012-09-18 11:07:30.837 MyApp[28507:fb03] I restkit.network.reachability:RKReachabilityObserver.m:391 Network availability has been determined for reachability observer <RKReachabilityObserver: 0x6c51e60 host=localhost isReachabilityDetermined=YES isMonitoringLocalWiFi=NO reachabilityFlags=-R -----l->
2012-09-18 11:07:30.886 MyApp[28507:fb03] I restkit.network:RKRequest.m:680 Updating cache date for request <RKObjectLoader: 0x6c54ec0> to 2012-09-18 11:07:30 +0000
2012-09-18 11:07:30.892 MyApp[28507:11503] W restkit.object_mapping:RKObjectMapper.m:87 Adding mapping error: Could not find an object mapping for keyPath: ''
2012-09-18 11:07:30.893 MyApp[28507:11503] E restkit.network:RKObjectLoader.m:231 Encountered errors during mapping: Could not find an object mapping for keyPath: ''
2012-09-18 11:07:30.914 MyApp[28507:fb03] Error : [didFailWithError]

And the json response is the following (it come from a Ruby on Rails Rest API) :

[
  {"commentaires":"bla bla",
   "created_at":"2012-09-17T21:15:55Z","id":1,
   "nom":"name 1",
   "prenom":"surname A",
   "telephone":"+33687330913",
   "updated_at":"2012-09-17T21:22:34Z"},

  {"commentaires":"bla bla",
   "created_at":"2012-09-17T21:22:20Z","id":2,
   "nom":"name 2",
   "prenom":"surname 2",
   "telephone":"",
   "updated_at":"2012-09-17T21:22:20Z"}
]
  • 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-11T16:06:21+00:00Added an answer on June 11, 2026 at 4:06 pm

    KeyPath is not the name of your json file, but the starting point for RestKit:

    {
        "contact": {
            "nom": "whatever nom is",
            "prenom": "same for prenom",
            // ...
        }
        // ...
    }
    

    In this case, “contact” would be your keyPath:
    [manager.mappingProvider setMapping:contactMapping forKeyPath:@"contact"];

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

Sidebar

Related Questions

While I am running this code it showing me a following error:- Column 'virtuemart_product_id'
I'm expecting the following code to produce an error in PHP, but it runs
Can anyone explain, why does the following code produce the error? (Compiling in Microsoft
Anyone have any ideas why the following code would produce an error, see additional
The following code produces the result I don't understand this. Any ideas why? If
This is an ajax file running the following code: $model = Mage::getModel('catalog/product'); //getting product
I use the following code to produce multiple boxplots, ranked by the mean value
The following code needs to produce an XML file. string path = @c:\load\myFile.xml; SqlConnection
The following C++ code i think is correct, but produce some warnings when compiled
Trying to customize Symfony2 form to produce html code looking like the following example:

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.