2

I've got an on going project where I'm using AFNetworking for request/response layer. And I want to use RestKit's ObjectMapping functionality for my JSON responses. I tried to install RestKit via cocoapods but it's going into conflict with already installed AFNetworking pod. So I wanted to ask if there any way to install RestKit's ObjectMapping module only, and without networking layer?

Shamsiddin Saidov
  • 2,281
  • 4
  • 23
  • 35

2 Answers2

1

You can have a look here https://github.com/RestKit/RestKit/issues/2028 where is under discussion the possibility to create a branch of RestKit without the AFNetworking dependency. In the meantime you can drop AFNetworking in your Podfile and let RestKit include it; the only downside with this approach is that you are stuck to AFNetworking 1.x.

DAN
  • 919
  • 1
  • 6
  • 23
  • yes, that's why I don't want to drop my AFNetworking 2.x – Shamsiddin Saidov Mar 09 '16 at 15:22
  • Unfortunately I'm afraid there's no simple solution. There are hypotheses about renaming in order to use both versions (http://stackoverflow.com/questions/21496696/is-it-possible-to-install-afnetworking-2-0-with-restkit) but they wouldn't be straightforward. – DAN Mar 09 '16 at 16:00
0

You can add "RestKit/ObjectMapping" as a Cocoapod dependency for your project without the base networking layer.

Or else check out the work in progress for RestKit issue 2028 in https://github.com/oligriffiths/RestKit. It doesn't require AFNetworking at all, but it may need your help getting to a stable state and passing all the tests.

Eric Hedstrom
  • 1,627
  • 10
  • 13
  • Consider specifically https://github.com/oligriffiths/RestKit/tree/feature/test_conformance – Wain Mar 11 '16 at 08:43