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
8
votes
7 answers

Restkit/Restkit.h file not found Xcode 6.1

I was working on Project in Xcode 6.1. It was working fine and all of sudden it prompted an error 'Restkit/Restkit.h file not found'. I'm getting error after changing Architectures from $(ARCHS_STANDARD_32_BIT) to Standard architectures…
Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
8
votes
1 answer

Can I use RestKit and Realm.io?

I want to use RestKit, but I already use Realm.io instead of CoreData. Is it possible to use RestKit on top of Realm.io?
Sam
  • 2,707
  • 1
  • 23
  • 32
8
votes
2 answers

why is RestKit changing my response content-type?

In short: I try to fetch data form the server with the content-type of the http request header set as @"text/html.. but for some reason RestKit changes that to application/JSON Explanation: If I were to make this request using just AFNetworking..…
abbood
  • 23,101
  • 16
  • 132
  • 246
8
votes
1 answer

RestKit Relationship Mapping with Primary Key

I am having trouble mapping relationships when the JSON response only contains the primary key and not a fully nested array to create the new object. I have 2 classes - Shop and Item, and as you would expect the Shop->Item has a one-to-many…
Andy
  • 717
  • 1
  • 9
  • 24
8
votes
2 answers

Map url parameters to objects using RESTKit

is there a way to map the parameters in an URL to the results? I got a rest service where the user can search something by its ID. The path is search/:id The results contains the name and other properties but not the ID. I could do something like…
Obenland
  • 856
  • 16
  • 28
8
votes
2 answers

CocoaPods generates invalid project file (header not found)

I have a project file with a Podfile that looks like this: platform :ios, '7.0' def import_pods pod 'Specta', '0.1.8' pod 'Expecta', '0.2.1' pod 'RestKit', '0.20.3' pod 'MagicalRecord', '2.1' pod 'RestKit/Testing', '0.20.3' end link_with…
Evan Cordell
  • 4,108
  • 2
  • 31
  • 47
8
votes
2 answers

Target Integrity - The file "Pods-ios.xcconfig" couldn't be opened because its path couldn't be resolved. It may be missing"

I'm trying to utilize the four Examples that ship with RestKit Version 0.20.1 Currently trying to Build RKSearchExample. The Build "succeeds" but no simulator appears and I get two warnings 1st one - Target Intergrity - The file…
Roy Jay
  • 81
  • 1
  • 2
8
votes
2 answers

RestKit: How to batch multiple requests and get a response once they finish?

I just found out RestKit and it will be an important part of the app I'm doing. At the time, I was able to integrate it with the core data, but have not figured out the best way to send multiple GET requests. What I need to do is: Get data from the…
hdoria
  • 624
  • 2
  • 14
  • 29
8
votes
1 answer

RestKit 0.20 JSON object is being serialized as GET style request in POST body

I'm just starting out with RestKit 0.20.0 and I'm having trouble creating a nicely formatted JSON request. I get this (from rest kit…
codemonkey
  • 1,213
  • 2
  • 14
  • 31
8
votes
1 answer

What's the difference between "attribute" and "property" in restkit

I am new for iOS RestKit framework. I have read the document and still can not figure out the differences between "attribute" and "property" in RestKit. Since in the document, there are - addPropertyMappingsFromArray: and –…
Ray Shih
  • 933
  • 8
  • 18
8
votes
4 answers

Problems with RESTKit, cannot map properly

I am learning RESTKit, and I am following this tutorial, which is according to previous version of RESTKit, and a lot has changed in v0.20.0, so I am reading about the new version and doing the same task as in tutorial. Now there is a problem in the…
SpeedBirdNine
  • 4,610
  • 11
  • 49
  • 67
8
votes
3 answers

Request timeout in restkit 0.20.0

I didn't find any way to set the timeout interval on restkit 0.20.0. Can anyone help to increase the timeout interval. Thanks
user1433374
  • 185
  • 1
  • 9
8
votes
2 answers

RestKit 0.20 — What is the preferred way to create a new NSManagedObject?

I'm curious to know what the best way is to create a new NSManagedObject in RestKit 0.20? Currently my code looks something like this: #pragma mark - navigation buttons - (void)createButtonDidTouch { // create new album object …
rosem
  • 1,311
  • 14
  • 19
8
votes
2 answers

Use of undeclared identifier 'RKClient' after install RestKit

After I installed RestKit according to instructions (get source with github) and after importing , I get a "Use of undeclared identifier 'RKClient'" Error in XCode.…
neno
  • 103
  • 1
  • 4
7
votes
2 answers

deleting core data persistent store instead of migrating (also using RestKit)

I'm making quite a few changes to the object model for our app upgrade release ie. entities added / removed, new attributes and relationships. It seems like the work would really add up for a proper core data migration. Since the data primarily…
PFaunik
  • 161
  • 1
  • 7