RestKit 0.2x is the latest major release of RestKit which includes several new features as well as significant changes since the previous 0.10.x. RestKit is a modern Objective-C framework for implementing RESTful web services clients on iOS and Mac OS X. It provides a powerful object mapping engine that seamlessly integrates with Core Data and a simple set of networking primitives for mapping HTTP requests and responses built on top of AFNetworking.
Questions tagged [restkit-0.20]
731 questions
4
votes
0 answers
RestKit not deleting orphaned relationship object
I have the following mapping:
RKEntityMapping *dashboardTeam = [RKEntityMapping mappingForEntityForName:@"DashboardTeam" inManagedObjectStore:managedObjectStore];
[dashboardTeam setAssignsDefaultValueForMissingAttributes:NO];
[dashboardTeam…

Bryan
- 3,199
- 3
- 16
- 24
4
votes
1 answer
Restkit fails to use appropriate Mapping
I am using Restkit 0.26.0 to map JSON with multiple layers and this key path causes trouble:
productColorImages: [
{
id: 10,
productId: "232",
color: "green",
url: "exampleURL.com"
},
{
id: 11,
productId: "232",
color: "red",
url:…

HasenBaumeister
- 117
- 8
4
votes
1 answer
RestKit - Map keypath of an array to the object inside of that array
I really stack up parsing this particular response with RestKit 0.20:
"addons": [
{
"id": 1,
"name": "Addon one",
"version": 2
},
{
"id": 2,
"name": "Addon two",
"version": 3
…

Andrew Slabko
- 690
- 8
- 15
4
votes
1 answer
RestKit: Creating stubs for foreign key relationships
I am struggling to map the foreign key relationships returned by my JSON API with RestKit.
Specifically, I use Loopback to generate an API with Entities like Team and User. There are two Endpoints by default that return the following…

knl
- 1,404
- 1
- 14
- 21
4
votes
2 answers
Restkit 0.22.0 how to map a simple JSON response with no keyPath to post
For simplicity the Rest API, sends this JSON response-body= { "status" : "ok"}.
I set-up my Restkit mappings like... created a Class called StatusResponse which has one @property (nonatomic, assign) NSString *status;
RKObjectMapping…

user3337849
- 99
- 1
- 8
4
votes
1 answer
RestKit - the entity (null) is not key value coding-compliant for the key "id"
I have a strange problem when trying to upload image with RestKit. I have studied similar questions but none of them could fix my problem.
In my application user can create comment on some Task.
So I have setup both RKEntityMapping and…

Khawar
- 9,151
- 9
- 46
- 67
4
votes
1 answer
RestKit in-memory mappings using multiple root keys
Let's say for example that we have a response like this:
{
"authors":[
{
"id":"9",
"name":"Some User",
"email":"some@email.com"
}
],
"comments":[
{
"id":"5",
"from":"Some Other…

ZeNewb
- 435
- 5
- 17
4
votes
1 answer
RestKit mapping array of string and a keyPath value at same Object
I've looking for an answer for hours, I have no ideia what to do.
I have a JSON that I need to map, which has an array of string with no keyPath, but also has an attribute that needed to be mapped which has a keyPath. I was using RestKit 0.21.0, and…

Felipe Docil
- 587
- 6
- 11
4
votes
1 answer
Core data relationship lost after fetching more objects into the entities
I have a core data model that looks like this.
Inside a tableview I load up all my appointments. On a UILabel inside my custom cell I set the appointments location name as follows.
NSString *info = appointment.location.label_vrij;
At first…

Steaphann
- 2,797
- 6
- 50
- 109
4
votes
2 answers
RestKit @root @parent accessors for mapping
UPDATE: SOLUTION DOCUMENTED IN ANSWERS BELOW
I'm having trouble with RestKit mapping using the new @root @parent accessors in 0.20.3. I'm not sure if it's a bug or a misunderstanding of how to use the framework properly.
PROBLEM
The new concept of…

radesix
- 5,834
- 5
- 24
- 39
4
votes
1 answer
RestKit: how to fetch a simple JSON array of strings?
How should I use RestKit to fetch a JSON array of strings like this :
["Paris", "London", "Brussels", "New York"]
I tried to make an object mapping but since there's no key path or attribute, I don't know what to map.
I don't even need a mapping,…

Alexis
- 16,629
- 17
- 62
- 107
4
votes
1 answer
Trouble With RKMappingResult. Can't find a way to get NSDictionary from result
I am trying to incorporate RestKit v.20 into my iOS App. I get the proper mapping result from RKObjectRequestOperation but I can't figure out a good way to put it into a NSDictionary. I am returned an array of objects of hex values. I can get the…

Richard McCluskey
- 588
- 6
- 16
4
votes
1 answer
RestKit 0.2 Error 'Expected status code in (400-499), got 200'
I am using RestKit 0.2, and I am getting the following error.
E restkit.network:RKObjectRequestOperation.m:237 GET 'http://some.url.com/o/3134' (200 OK / 0 objects) [request=3.2563s mapping=0.0000s total=3.2955s]: Error…

Jake Lin
- 11,146
- 6
- 29
- 40
4
votes
3 answers
RestKit: mapping JSON array of strings
Given the following JSON:
{
"someKey":"someValue",
"otherKey":"otherValue",
"features":[
"feature1",
"feature2",
"feature3"
]
}
I am mapping this JSON into NSManagedObjects with RKMapperOperation and RKEntityMapping(in…

e1985
- 6,239
- 1
- 24
- 39
4
votes
0 answers
NTML Authentication and Restkit (0.2.0) - defaultCredentials not set for Object Request
This is for Restkit v0.2.0 for iOS.
I am trying to use Windows Authentication by setting the default credentials for the HTTP client so that when the request's authentication is challenged it works.
I do that like this:
[[RKObjectManager…

Jordan
- 141
- 1
- 8