O'Reilly logo

RestKit for iOS by Taras Kalapun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Modeling and Loading Remote Objects

We can use the RKObjectRequestOperation class for every single request, as seen in the basic example of the previous chapter. But such code blocks will tend to be pretty big, and against the Don't Repeat Yourself (DRY) principle.

The most preferable way would be to configure all the API endpoints and their mapping configuration in one place, and then just use one-line request methods.

This chapter will describe how to configure our project to leverage such an approach using RKObjectManager and configured object mapping. Apart from discussing how to load the remote objects, we will get some knowledge on pushing data and objects back to the server. Additionally, the chapter will describe how to make our ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required