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
6
votes
2 answers

RestKit - Load a simple array

I'm using RestKit into my iPhone application to load a list of countries. The problem is the elementToPropertyMappings method uses a dictionary to map each object. In my case I have an array of strings that I'd like to map to the name property on…
jspooner
  • 10,975
  • 11
  • 58
  • 81
6
votes
6 answers

How to integrate RestKit Framework (restkit.org) with xCode 4?

I followed the instructions on the github page but something is wrong (most certainly is me: P) but, Do you know about any good tutorial for integrate / use in Xcode4 RestKit? Thanks!
Guerrix
  • 198
  • 1
  • 3
  • 13
6
votes
1 answer

Inconsistent results from setting the fetchOffset of NSFetchRequest in CoreData

I have the method below which gets a page of CoreData entities out. When I pass in a value for start I get inconsistent results. Sometimes it will page as I would expect, other times it really really doesn't. It seems to get results from…
Matt Fellows
  • 6,512
  • 4
  • 35
  • 57
6
votes
2 answers

How to enable restkit logging in swift

In iOS I can enable restkit logging with: RKLogConfigureByName("RestKit/Network*", RKLogLevelTrace); But, I can't find a solution to do the same in Swift
Dmitry Nelepov
  • 7,246
  • 8
  • 53
  • 74
6
votes
4 answers

pod install Unable to add source

I want to do pod install, but i got these error. Error: Analyzing dependencies Cloning spec repo `wackadoo` from `gitATgithub.com:Repo/Repo.git` [!] Unable to add a source with url `gitATgithub.com:Repo/Repo.git` named `Repo`. You can try adding it…
alexohneander
  • 519
  • 3
  • 7
  • 22
6
votes
1 answer

“Include of non-modular header inside framework module” while compiling pod

I am creating a pod that uses RestKit and a bunch of other pods. When I am compiling my pod with the command : pod repo push myCocoapodsRepo myPodspec.podspec --allow-warnings --verbose The first error I get is In file included from…
Raphael Royer-Rivard
  • 2,252
  • 1
  • 30
  • 53
6
votes
1 answer

Using RestKit in Swift

I have successfully added 'RestKit' pod into my project and also followed steps described in this article: Cocoapods in swift. I imported the RestKit into my ViewController class's source file: import RestKit But I don't know why I can't access it.…
Alvin Varghese
  • 842
  • 10
  • 33
6
votes
1 answer

NSFetchedResultsController does not read updated derived value in CoreData entity after RestKit EntityMapping update

I have a view controller where I create an NSFetchedResultsController to display a set of CoreData objects in a TableView. While viewing these objects in the tableview, they are updated by calling a RestKit getObjectsAtPath, which processes…
deepwinter
  • 4,568
  • 2
  • 31
  • 37
6
votes
2 answers

How to use circular references in RestKit using $ref and $id

I have an API using the json.net serialization library. It uses $ref and $id fields for circular references. RestKit does not realize that these $ref fields are referring back to another object that has already been serialized. Is there a way to…
Kyle Redfearn
  • 2,172
  • 16
  • 34
6
votes
6 answers

Xcode: Undefined symbols for architecture arm64 error

In my Xcode 5 project I use RestKit for REST communication. Everything works fine with the simulators, but generating the ipa file, I get the following error: ld: warning: ignoring file…
Jose Rodriguez
  • 9,753
  • 13
  • 36
  • 52
6
votes
1 answer

Map followers/following relationship with Restkit

In my core data project I have a User entity with a followers/following relationship which destination is also the User entity. To get the info of a given user I call an endpoint with this structure: user/:id/ To fetch his followers/following users…
fdezjose
  • 607
  • 2
  • 9
  • 18
6
votes
2 answers

When will completionBlock be called for dependencies in NSOperation

From the docs: The completion block you provide is executed when the value returned by the isFinished method changes to YES. Thus, this block is executed by the operation object after the operation’s primary task is finished or cancelled. I'm…
6
votes
1 answer

RestKit: how to remove core data entries to keep the content in sync with the server?

I'm using the RestKit RKObjectManager to get data from my server and store in core data (see my other post) I want to configure the deletion behavior of the old entries left in the database. I saw there's a deletionPredicate property in the…
Alexis
  • 16,629
  • 17
  • 62
  • 107
6
votes
2 answers

Restkit .20 request timeout interval

Trying to set a request Timeout Interval on Restkit. This post mentions HTTClient, but HTTPClient does NOT seem to have a way to set a timeout interval. Request timeout in restkit 0.20.0 Does anyone know how to set an interval?
jdog
  • 10,351
  • 29
  • 90
  • 165
6
votes
1 answer

Restkit 0.20 nested array of objects mapping issue

I'm having an issue mapping the following JSON payload using RestKit 0.20 I am trying to map the Product and its Attachments as an array with the following objects. I am not using RKEntityMapping, simply RKObjectMappings as this app is not using…
Jorge Chao
  • 61
  • 1
  • 3