RestKit: How does one post an array of objects?

The restkit does not fund routable path for NSArray, because you defined your routing for NSManagedObject class. You probably want to create a custom class, say MySyncEntity that holds the ivars you define in your mapping. Then, you create your mapping like this: RKObjectMapping* mapping = [RKObjectMapping mappingForClass:[MySyncEntity class]]; …. [myManager setSerializationMIMEType:RKMIMETypeJSON]; [[myManager router] routeClass:[MySyncEntity … Read more

Foreign key relationship mapping with RestKit

You need to add a transient attribute to your User entity which holds the associated teamId. This needs to be added to your userMapping. Then, you need to add a relationship definition to your userMapping: [userMapping addConnectionForRelationship:@”team” connectedBy:@{ @”teamId”: @”teamId” }]; This gives RestKit the information it needs to make the connection and instructs it … Read more