Questions tagged [restkit]

RestKit is an Objective-C framework for iOS that aims to make interacting with RESTful web services simple, fast and fun. It combines a clean, simple HTTP request/response API with a powerful object mapping system that reduces the amount of code you need to write to get stuff done.

A simple, high level HTTP request / response system.

RestKit ships with an HTTP client built on top of NSURLConnection and provides a library of helpful methods for inspecting MIME types and status codes. Submitting form data is as simple as providing a dictionary of parameters and a native params object is included for easily creating multi-part submissions.

Core Data support.

Building on top of the object mapping layer, RestKit provides integration with Apple’s Core Data framework. This support allows RestKit to persist remotely loaded objects directly back into a local store, either as a fast local cache or a primary data store that is periodically synced with the cloud. RestKit can populate Core Data associations for you, allowing natural property based traversal of your data model. It also provides a nice API on top of the Core Data primitives that simplifies configuration and querying use cases.

Database Seeding.

When the Core Data object store is used, you can seed a database from a collection of data files. This lets you submit your apps to the App Store with a database in the app bundle that is ready for immediate use.

Framework level support for switching servers & environments (development/production/staging).

RestKit uses a base URL and resource paths rather than full URL’s to allow you to switch target servers quickly. Interpolating URL strings and constructing NSURL objects is a thing of the past.

An object mapping system.

RestKit provides a modeling layer for mapping processed data payloads into native Cocoa objects declaratively. This lets the application programmer stop worrying about parsing and simply ask the framework to asynchronously fetch a remote resource and call the delegate with the results. Object mapping is implemented using key-value coding, allowing for quick traversal of the parsed object graph. Reflection is used on the property types to allow for mapping from remote dates encoded as a string back to NSDate objects.

Pluggable parsing layer.

RestKit currently supports JSON via the SBJSON and YAJL parsers. Parsing is implemented behind a simple interface to allow additional data formats to be handled transparently.

References

2699 questions
0
votes
1 answer

RestKit RKDynamicObjectMapping work only for first JSON result

i got into an issue with RKDynamicObjectMapping, however it could be that i misuse it. I have the following scenario request to the service to get areas choose area request to the service to get journals for selected area data returned by both…
vittore
  • 17,449
  • 6
  • 44
  • 82
0
votes
2 answers

Save/Delete Local Object with RestKit on iPhone IOS

I'm trying to store local objects (not mapped) with Core Data and Restkit but it doesn't work. I created a NSManagedObject : @interface JSONOrder : NSManagedObject @property (nonatomic, retain) NSNumber * shopId; @property (nonatomic, retain)…
Julien
  • 87
  • 3
  • 9
0
votes
1 answer

Overcoming issues with RKReachabilityObserver in RestKit

I posted recently about the best way to implement RKReachabilityObserver (part of the RestKit project) in my iOS project. mja kindly informed me that there was a singleton available which I implemented at various points in my application. I set the…
Nick
  • 5,844
  • 11
  • 52
  • 98
0
votes
1 answer

RESTkit Code 1001 could not find object for keyPath: "'"

Thanks in advance for all your help community!! i had a early problem which was pointed out to me and i fixed "[Person object]-should be-->[Person alloc]init]i fixed that and now able to add a Person object now to my server. But here is the…
David Yang Liu
  • 1,170
  • 2
  • 10
  • 19
0
votes
1 answer

RESTkit unrecognized selector error

I'm trying to add a person class via iPhone to my server. I have the following code and I get this error: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[Person object]: unrecognized selector sent to class…
David Yang Liu
  • 1,170
  • 2
  • 10
  • 19
0
votes
1 answer

RestKit - handling nesting of attributes

I have downloaded the latest RestKit version 0.9.3 from github and noticed that the method mapFromKeyPath: toAttribute: has been removed from RKObjectMapping. The method is used to nest attributes in the Json body of the message. Is there a…
Llama.new
  • 357
  • 8
  • 23
0
votes
1 answer

No Request will send if app is in background mode Optionen

With a trick it is possible to run the app, if the home button is pressed. In the background mode, no request with RKRequestQueue will be send, so the app receive no response from backande server and the app can't update the data.
abuder
  • 1,030
  • 2
  • 13
  • 31
0
votes
2 answers

No delegates were triggered if app is in backgroundmode

I am at the beginning with RestKit-development. I develop an app that get data from a Server and map these in objects. With a trick of silence music, is it possible to send request to the backend, if the app is in background mode . If I leave the…
abuder
  • 1,030
  • 2
  • 13
  • 31
0
votes
1 answer

RestKit didFailWithError always called, didLoadObjects never called

Well, the title pretty much says it all. I'm calling my server and when it suceeds or fails it calls my didFailWithError method, never calling my didLoadObjects method. I would have expected didFailWithError to be called when, say, I get a 401 back,…
Paul Cezanne
  • 8,629
  • 7
  • 59
  • 90
0
votes
0 answers

RestKit: RKObjectMapperDelegate still in use?

I would like to use the delegate methods from RKObjectMapperDelegate, but those are never called before/during/after my mappings... Do I have to set them somewhere? If yes, where? Or are they not in use any more? If not - how do I achieve e.g. the…
swalkner
  • 16,679
  • 31
  • 123
  • 210
0
votes
1 answer

sign in/out views for iOS authentication

I'm new to iOS programming. Wondering if anyone can point me to a sample project that includes the views and logic for the user sign in/sign out process. Ultimately I plan to use the Restkit library, but I could use some help acquiring the user name…
Drew Dara-Abrams
  • 8,016
  • 11
  • 40
  • 48
0
votes
1 answer

RestKit: JSON mapping doesn't work

how should the mapping look like if I've got a JSON-response like this: { "persons":{ "@size":"4", "person":[ { "name":"John", "type":"Doe 1", "options":"some options" }, { "name":"John", …
swalkner
  • 16,679
  • 31
  • 123
  • 210
0
votes
1 answer

Login issue on RestKit for iPhone

I'm having hard time understanding this problem: I'm using Restkit for iPhone sdk 5.0 and I'm doing the login in a class Session NSString* url=[[[RKClient sharedClient]baseURL]stringByAppendingString:@"/users/sign_in"] ; RKRequest *request =…
Massimo
  • 159
  • 1
  • 10
0
votes
1 answer

Exit Code 1 Error after building iOS Application

I am trying to build my project with RestKit, when I build it I get the error below. I have tried compiling using Apple LLVM 3.0 and LLVM GCC 4.2 and both produce the same result. Any have any ideas what is causing this issue? Ld…
atrljoe
  • 8,031
  • 11
  • 67
  • 110
0
votes
1 answer

RKRequestDelegate TotalBytesExpectedToReceive always returns -1

I am implementing -(void)request:(RKRequest *)request didReceivedData:(NSInteger)bytesReceived totalBytesReceived:(NSInteger)totalBytesReceived totalBytesExpectedToReceive:(NSInteger)totalBytesExpectedToReceive { …
shannoga
  • 19,649
  • 20
  • 104
  • 169