Questions tagged [rkobjectmapping]
31 questions
3
votes
2 answers
Confusion setting mapping in RKObjectMapping - Rest
Please help in set mapping with RestKit, I am lost to find how to do this.
My JSON is like
{
"result":{
"success":"1",
"message":"You logged in successfully.",
"data":{
"user_id":"1",
"firstname":"somefirstname",
…

Janak Nirmal
- 22,706
- 18
- 63
- 99
3
votes
1 answer
Restkit GET calls are not being sent asynchronously?
I am using Restkit in my iOS app to make a GET call to my server. I am able to get the call to work just fine, except that it is supposed to be asynchronous and it is blocking my main thread. I am basically using their exact sample to make the…

lehn0058
- 19,977
- 15
- 69
- 109
2
votes
1 answer
How to map a local JSON string into an object using RestKit 0.24 with RKObjectMapping?
I am trying to map a JSON NSString into an object using RestKit 0.24.0 where I have a RKObjectMapping as well as the corresponding dictionary.
Most of the solutions online refer to RestKit 0.22 and below.
Some of the solutions on SO result into app…

rahulg
- 2,183
- 3
- 33
- 47
2
votes
6 answers
CocoaPods update RestKit #import "RKObjectMapping.h" file not found
I want to update some of my project pods and after run pod update "some_framework" and try to build project appear this error:
import "RKObjectMapping.h" file not found
Current CocoaPod version is 0.39.0 I have tried to downgrade to 0.38.2 and…

Imodeveloper
- 93
- 2
- 8
2
votes
1 answer
Deletion of Orphaned objects in restKit 0.20
At the moment I'm struggling with the deletion of Orphaned objects.
I've the following classes.
MAPPER CLASS
In this class I create all my RKObjectManagers and use it in my other classes.
-(RKObjectManager *)mapAppointments{
RKEntityMapping*…

Steaphann
- 2,797
- 6
- 50
- 109
1
vote
0 answers
Response 200OK but code enters the failure block in restkit
I have connected Charles to check the response of the call. The response header return 200OK but even then the code enters the failure block. Does it have to do anything with the way mapping is defined or is it some other trivial issue?
NSString…

A_G
- 2,260
- 3
- 23
- 56
1
vote
0 answers
RestKit Object Mapping with large number of properties
I have used RKObjectMapping for parsing my JSON response using RestKit.
For ex:.
RKObjectMapping *menuItemMapping = [RKObjectMapping mappingForClass:[MenuCategoryItem_arr class]];
[menuItemMapping addAttributeMappingsFromArray:@[@"item_id",
…

Raj Gajera
- 11
- 2
1
vote
0 answers
RestKit RKObjectMapping mapping a simple root array
For a simple object response
{"api_key": "cool api key"}
I use RKObjectMapping like this:
class APIRegisterResult: NSObject {
var api_key: String = ""
}
let registerMapping : RKObjectMapping = RKObjectMapping(forClass:…

Gintas_
- 4,940
- 12
- 44
- 87
1
vote
0 answers
How to prevent Restkit RKObjectMapping keyPath being serialization
I want to map the following parameter and POST this request body to the server.
RKObjectMapping * mapping = [RKObjectMapping mappingForClass:[MessagingRequestModel class]];
[mapping addAttributeMappingsFromDictionary:@{
…

Chris Suen
- 312
- 3
- 8
1
vote
1 answer
How to map local NSDictionary into a custom Object using RKMappingOperation?
RJobObject * jobObj = [RJobObject new];
RKMappingOperation *mappingOperation = [[RKMappingOperation alloc] initWithSourceObject:jobDictionary destinationObject:jobObj mapping:[RJobObject mapping]];
mappingOperation.dataSource =…

Swappy Dwappy
- 97
- 6
1
vote
1 answer
Restkit: including field from request into object mapping
I am making rest call as this
GET /entities?parent=123
[
{id:1, name:"name 1"},
{id:2, name:"name 2"}
]
My entity defination have following fields
id
name
parent
The problem is that parent field is not coming in the response, It is in the…

hridayesh
- 1,123
- 1
- 14
- 36
1
vote
1 answer
restkit mapping nested array is empty (nested restkit request with json response)
Am i doing something weired here ?
my categories get downloaded and mapped,
product also get downloaded and mapped as logging is saying,
but my products are empty under each category,
thnx!
{
"productsCategories" : [
{
"product" : [
…

mamadoo
- 43
- 5
1
vote
0 answers
warnings about "failed mapping nested object: (null)"
I'm getting JSON back from a REST call. I've created a mapping called "Teacher", which has 3 properties in it. Nothing special.
Another object "Classroom", has a property to the teacher object. So it looks something like this:
classroom : {
…

Dan Morrow
- 4,433
- 2
- 31
- 45
1
vote
1 answer
RKMappingresult returning different result in 64-bit iphones with restkit
I have a strange problem with Restkit. I'm doing the following:
-(void)doLogin:(NSString *)email andPassword:(NSString *)password OnCompletion:(myCompletion) compblock{
Mapper *mapper = [Mapper new];
RKManagedObjectStore *store =…

Steaphann
- 2,797
- 6
- 50
- 109
1
vote
1 answer
Restkit mapping objects to NSArray
I have an object that consists of some fields such as:
@property (nonatomic, copy) NSString* title;
@property (nonatomic, copy) NSString* body;
@property (nonatomic, copy) NSArray* …

biloshkurskyi.ss
- 1,358
- 3
- 15
- 34