Note that there are some explanatory texts on larger screens.

plurals
  1. PORestkit - didLoadObjects is receiving an empty array
    primarykey
    data
    text
    <p>I have read every post and went through the tutorials and I cannot figure out why the "objects" array is empty. In the didLoadResponse method I am able to see [response bodyAsString] in the log. Below is the xml I am loading and the code I am using for object mapping. Any help would be greatly appreciated. </p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;articles&gt; &lt;article&gt; &lt;title&gt;This is a test title for article 1&lt;/title&gt; &lt;link&gt;google&lt;/link&gt; &lt;description&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed quis bibendum eros. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.&lt;/description&gt; &lt;publicationDate&gt;23 Feb 2012&lt;/publicationDate&gt; &lt;/article&gt; &lt;/articles&gt; RKObjectMapping* articleMapping = [RKObjectMapping mappingForClass:[Article class]]; [articleMapping mapKeyPath:@"title" toAttribute:@"title"]; [articleMapping mapKeyPath:@"link" toAttribute:@"link"]; [articleMapping mapKeyPath:@"description" toAttribute:@"description"]; [articleMapping mapKeyPath:@"publicationDate" toAttribute:@"publicationDate"]; //I changed my BaseURL for this post RKObjectManager* manager = [RKObjectManager objectManagerWithBaseURL:@"myserverpath"]; [manager.mappingProvider setMapping:articleMapping forKeyPath:@"articles.article"]; [manager loadObjectsAtResourcePath:@"/restkit/restkit_test.xml" objectMapping:articleMapping delegate:self]; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload