When I attempt to import the RestKit api into a project I get the following error:
/Documents/Code/RestTest/RestKit/Code/Network/RKHTTPRequestOperation.h:21:9:
'AFNetworking.h' file not found
I have installed RestKit as a git submodule, how do I resolve RestKit's dependency on AFNetworking?
Once cloned, simply do in the RestKit directory:
git submodule update --init --recursive
This will pull the AFNetworking version RestKit needs
If you use CocoaPods will do all this automaticaly.
From RestKit install docs:
Install CocoaPods if not already available:
$ [sudo] gem install cocoapods
$ pod setupEdit your Podfile and add RestKit:
$ edit Podfile
platform :ios, '5.0'
pod 'RestKit', :git => 'https://github.com/RestKit/RestKit.git', :branch => 'development'Testing and Search are optional components
pod 'RestKit/Testing', :git => 'https://github.com/RestKit/RestKit.git', :branch => 'development'
pod 'RestKit/Search', :git => 'https://github.com/RestKit/RestKit.git', :branch => 'development'Install into your project:
$ pod install
Please note that if your installation fails, it may be because you are installing with a version of Git lower than CocoaPods is expecting. Please ensure that you are running Git >= 1.8.0 by executing git --version. You can get a full picture of the installation details by executing pod install --verbose.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With