7

I’m not certain that this is a RestKit issue, and I’ve tried reinstalling RestKit via CocoaPods many times, but eventually I get this error:

<RestKit/RestKit.h> file not found

Everything compiles fine, and RestKit works. I've set the header search paths to $(inherited), just as with other linker flags.

This is unfortunate, because now the autocomplete for those classes isn’t working.

I’ve tried cleaning, deleting derived data, and restarting Xcode, all to no avail.

NotMe
  • 87,343
  • 27
  • 171
  • 245
mkral
  • 4,065
  • 4
  • 28
  • 53

2 Answers2

9

I came across this question when having the same problem, but I had a very different solution that worked right away.

For whatever reason, sometimes a project seems to lose track of some settings that relate to CocoaPods. In my case it was triggered when I downloaded a project from a repository that had been set up by someone else - even running "pods install" again did not remove the compilation error.

I finally ran across the solution somewhere, the project needs to make use of Pods config files for your target. Go into your project settings "Info" tab, open the "Configurations" section. Expand both Debug and Release, check to make sure that for your project have the "pods" configuration set. If not, click on the drop down and select "pods" for Debug and Release - now compile and the error should go away.

Here's an image showing exactly what part of the XCode configuration I'm talking about.

Pods Configuration set for project

Kendall Helmstetter Gelner
  • 74,769
  • 26
  • 128
  • 150
0

I believe the issue is more related to Xcode than the cocoapods themselves. I've seen this issue on other pods I've imported as well where they don't autocomplete the headers. As Keith said in the comments, you should be able to import the header you need and the rest of the code should autocomplete from there.

Bill Burgess
  • 14,054
  • 6
  • 49
  • 86