Questions tagged [restkit-0.20]

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.

731 questions
4
votes
1 answer

Restkit 0.20: POST CoreData relationship with Foreign-Key

I'm struggling a bit with RestKit and CoreData, especially since there are so little examples and documentation out there for RestKit 0.20. I have an (managed) object Song with a many-to-one relationship with Album. The following code can post JSON,…
4
votes
2 answers

Restkit: migrating to 0.20

I am trying to migrate to RestKit 0.20-pre2. Currently I managed to migrate my mapping (at least the compiler does not complain anymore), but I have problems in creating requests (previously I used the RKObjectLoader which does not exist anymore. My…
Francesco
  • 1,840
  • 19
  • 24
3
votes
2 answers

RestKit RKAttributeMapping fromKeyPath Error on Archive

I am using RestKit 0.26.0 in a mixed Swift / Obj C project. We are setting up relationship mappings in a Swift file, and when I run or build the project normally, everything works correctly. However, when I try to archive the app to upload for…
3
votes
2 answers

Flatten request mapping hierarchy in RestKit

With RestKit, I'm trying to create a request mapping that would convert a payment object into JSON. This object stores sub-payments, of which only one is valid. This valid payment is represented by the property selectedPayment. I think the typical…
Arkcann
  • 618
  • 7
  • 15
3
votes
3 answers

RestKit valueTransformer not being called

I am using RestKit to talk to my JSON endpoints. The endpoint returns a UNIX timestamp in 'number of milliseconds'. But RestKit's default transformer assumes that it is 'number of seconds' and I get a wrong value in NSDate. So I looked around, and…
Rahul Jiresal
  • 1,006
  • 13
  • 24
3
votes
1 answer

Get current reachability state with RestKit 0.20

So I'm using RestKit 0.20.0 and getting reachability changes via this block: [objectManager.HTTPClient setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { if (status == AFNetworkReachabilityStatusNotReachable) { …
codeman
  • 8,868
  • 13
  • 50
  • 79
3
votes
1 answer

CoreData serious application error

Every once in awhile, I get the following error message in my application. This happens after my application receives back a web service response via RestKit w/ CoreData integration: CoreData: error: Serious application error. Exception was caught…
Dan
  • 468
  • 1
  • 4
  • 19
3
votes
0 answers

Restkit: getting objc_exception_throw in saveContextToPersistentStore, RKManagedObjectRequestOperation.m

I am getting, just for once every app runtime, an exception in the method saveContextToPersistentStore in RKManagedObjectRequestOperation.m: on line success = [contextToSave save:&localError]; success is YES, localError is nil. I can continue the…
Vladimír Slavík
  • 1,727
  • 1
  • 21
  • 31
3
votes
1 answer

Reskit response is just a string, not JSON

In my app i am making different calls and they work except one call, that returns just a string in response as SUCCESS. I am getting this error "The operation couldn’t be completed. (Cocoa error 3840.)", NSLocalizedDescription=Loaded an…
Paragon
  • 982
  • 2
  • 10
  • 37
3
votes
1 answer

RESTKit: No mappable object representations were found at the key paths searched

Log: 2014-04-09 15:03:10.196 App[49808:60b] request { URL: http://www.domain.com/meetups?lastrequest=2014-04-09T15%3A03%3A10Z } 2014-04-09 15:03:10.214 App[49808:60b] I restkit.network:RKObjectRequestOperation.m:180…
user1107173
  • 10,334
  • 16
  • 72
  • 117
3
votes
1 answer

Restkit, put parameters in path

I want to consume this api endpoint .../country/search/{query} another way would be .../country/search?query={query} however the api does not support that. How can I support the first style with restkit and not violate the path…
DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
3
votes
1 answer

RestKit Conditional Mapping

I have a Media model, and Image,Video and Audio models that inherit from media. I am using RestKit to map the data from an API(rails app). Is there a way to do a conditional mapping using RestKit? If my response contains a media_type of video,…
ShivamD
  • 931
  • 10
  • 21
3
votes
1 answer

RestKit: How to handle empty response.body?

I request something with POST, and the server just sends status-code 200 with a content-length of 0 back. How can I handle this? I'm not allowed to add a RKResponseDescriptor without mapping, nor not add the RKResponseDescriptor.
Nick
  • 2,662
  • 2
  • 25
  • 48
3
votes
2 answers

Seeking recommendations for best RestKit/CoreData mapping and JSON structure for shallow routes

I'm developing a CoreData iOS app that's backed by a (Rails) REST API (that supports shallow routes). Because there are a lot of objects in the graph, I'd like the REST GETs to not to include a lot of nested results and, instead, just contain…
David Carney
  • 2,200
  • 1
  • 19
  • 28
3
votes
1 answer

Mapping to complex objects with restkit

I am trying to map a complex json object to my objects my json contains a property that is a true or false value: object { rootProp2 = 1; <== fails to get mapped (this is a BOOL object) } to object result: (null), (null),(null),(null) with object…
Lena Bru
  • 13,521
  • 11
  • 61
  • 126