0

I have a project for OS X which uses RestKit (installed as git submodule). Yesterday I updated the RestKit submodule and I found out the use of AFNetworking (so I have to change some of my code which used RKClient).

The problem is that I cannot build my project anymore. I have to migrate my code yet, but the error is

RestKit.framework/Headers/RKHTTPRequestOperation.h:21:9: fatal error: 'AFNetworking.h' file not found

#import "AFNetworking.h"

If I open only the RestKit project, then the framework is successfully built, but the first time I include it (with #import <RestKit/RestKit.h>) the above error appears!

BTW: doing in my RestKit folder git pull origin master updates the module, but did not downloaded the AFNetworking files.. I manually copy the files in the folder. Am I missing something in the update procedure?

Thank you

Community
  • 1
  • 1
Francesco
  • 1,840
  • 19
  • 24

2 Answers2

2

cd into RestKit directory, and then do

git submodule init
git submodule update

That will pull the necessary AFNetworking files. Then rebuild.

Simon Woodside
  • 7,175
  • 5
  • 50
  • 66
  • Files are present on the file system and in the project. Simply it does not build. BTW, cmc + click on the header file opens the correct file, to Xcode sees it! – Francesco Dec 08 '12 at 08:39
0

Solved by installing RestKit through CocoaPods...

(the accepted answer given in RestKit and AFNetworking build error did not worked for me.. but the advice to install cocoapods yes)

Community
  • 1
  • 1
Francesco
  • 1,840
  • 19
  • 24
  • this is not a good answer to this question. I have the same issue, I don't want to use CocoaPods. I know that CocoaPods track dependencies and will grab AFNetworking for you but your answer does not address why the problem occurs and a general case for fixing it. – Aran Mulholland Dec 06 '12 at 23:41
  • I'm sorry... I lost 3 days trying to solve this, and the only way to continue working was to switch to CocoaPods.... – Francesco Dec 08 '12 at 08:40
  • 1
    answered here as well http://stackoverflow.com/questions/13754547/restkit-and-afnetworking-build-error/13762665#13762665 – Aran Mulholland Dec 08 '12 at 10:26