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 - enqueueObjectRequestOperation not being called after adding rootviewcontroller in appdelegate

I have been using Restkit to connect to my API server, and it works perfectly. Now my situation is that I added a checker in my appdelegate.m in didFinishLaunchingWithOptions. it checks if there is already adminID in the coredata. if there was a…
0
votes
1 answer

RestKit Mapping array of objects

I'm using RestKit to make an API call, but one of my property isn't mapping correctly. Say I have: // Animal.h @interface Animal: NSObject @property (nonatomic, strong) NSArray favoriteFruits; @end with implementation: // Animal.h // This…
7ball
  • 2,183
  • 4
  • 26
  • 61
0
votes
1 answer

How to add objects of entity class(DTO's value) using "addAttributeMappings" in RestKit?

My json response contains not only strings, but also array of DTO. Object mapping is not happening in the right format. json response body : { "id": null, "componentName": "Home Loan", "dynamicTableDetailDTOList": [ { "id": 1, …
ABM
  • 565
  • 7
  • 18
0
votes
0 answers

RestKit mapping few object at one time

When I'm sending get requests for a few objects, I'm receiving objects one by one. I see that the mapping time increases for each object, so it looks like: 1st get request - 00:00 2nd get request - 00:00 3rd get request - 00:00 1st responce -…
Vasilii Muravev
  • 3,063
  • 17
  • 45
0
votes
0 answers

Mapping a Dictionary to a RestKit result

In a JSON model coming from a REST api I have a field that is supposed to be a Dictionary (a map, hashtable, call it whatever you want), e.g.: "moduleMap": { "677e55b2-d80c-4b32-bcbb-e99074fbfcf6": { "id":…
Milan Nosáľ
  • 19,169
  • 4
  • 55
  • 90
0
votes
2 answers

RestKit - mixing entity mapping and object mapping

I am using RestKit in my iOS app and up until now I was simply using object mapping because I wasn't persisting any data to CoreData. I now want to add the possibility for the users to download some data, and use that data if the user has no…
el-flor
  • 1,466
  • 3
  • 18
  • 39
0
votes
0 answers

Why does the managed object returned by Restkit only have the attributes (of CoreData) and not also the values (other properties)?

The problem is that in my mapping I have some properties which are persistent while others are not. So, in callback the object only has the attributes (of CoreData) but not the values (other properties). In other words, although I have checked that…
93sauu
  • 3,770
  • 3
  • 27
  • 43
0
votes
1 answer

How to post without post data using RestKit

I was looking for a way to map an empty object to be posted to an endpoint. The call needs to be a POST, but there shouldn't be any data posted to the endpoint (empty body), it's only about calling the endpoint directly without data. I've tried…
GabLeRoux
  • 16,715
  • 16
  • 63
  • 81
0
votes
2 answers

Frameworks File not found

I'm converting my old(32 bit) project to new (64 bit). I'm facing this issue for past one day. Still I'm not able to resolve the issue. I used RestKit project, FacebookSDK & Opentok frameworks. I added those frameworks into my project directory. My…
Senthilkumar
  • 2,471
  • 4
  • 30
  • 50
0
votes
1 answer

Execute a function before and after a request finishes in RestKit

I want to call a function to start a spinner before every request is made and stop it after every request (fail or success) finishes in Restkit. How would I achieve this without having to manually call my spinner start/stop function before and after…
7ball
  • 2,183
  • 4
  • 26
  • 61
0
votes
0 answers

posting data not showing same format in server side using Restkit

i have dictionary of data in my hand.i want to post this Using Restkit. ""ADDRESS{ major = 604; minor = 37940; uuid = "xxxxxx"; }, {major = 1; minor = 4541; uuid = "xxxxx"; },{ major = 20310; minor = 48417; uuid = "xxxx";}, i passed this data…
Manju
  • 27
  • 8
0
votes
1 answer

Filtering Server Response RestKit + CoreData

Im using RestKit+CoreData. And i always get response code 200 from server. And I don't need all responses to save into core data, Is there any way to filter response ?
Evgenii
  • 422
  • 2
  • 14
0
votes
1 answer

RestKit, RKEntityMapping trouble with Response Descriptors

Im trying to use RestKit with RKEntityMapping ;( Help! NSURL *baseURL = [NSURL URLWithString:@"http://api.mymemory.translated.net"]; RKObjectManager *objectManager = [RKObjectManager managerWithBaseURL:baseURL]; // Initialize managed object…
Evgenii
  • 422
  • 2
  • 14
0
votes
0 answers

Updated core-data values not retaining after App killed and re-launched

I have update a NSModelObject and saved using the following code, the changes are saved and updated in app. do { try managedObjectContext.save() } catch { print("Could not save") } But when I kill the app and re-launch it the updated…
Bharath
  • 2,064
  • 1
  • 14
  • 39
0
votes
1 answer

RestKit putObject - should it handle persistence back to the Core Data store for me?

I'm working with RestKit 0.27.0 and have managed to setup my Core Data stack almost exactly like in the TwitterCoreData example in RestKits GitHub. I've also mapped GET / POST requests which are persisting the Objects in Core Data correctly, though…
Mark
  • 480
  • 4
  • 11
1 2 3
99
100