1

I've used RestKit about a year ago when it was going through the transition between 0.1 and 0.2. I had everything running using a manual install.

I've now started a new project and wanted to use RestKit again. But I can't get it to install properly. This time I did the cocoa pods method of install and it all looked like it went well. I had included the #import in my .pch file so it was global.

The project compiled and build was successful but when I opened the class file in the editor where I had some RestKit code in (getting the RKManagedObjectStore etc) I was getting semantic errors. It couldn't find the RestKit classes.

I removed the import of RestKit from my .pch file and just put it in my header file of the class I was working on I got the error that RestKit could not be found.

In the troubleshooting guide on RestKit's site it basically states to ensure the project is building in the derived data. I checked and everything was ok.

I also tried deleting the derived data and cleaning the project without luck.

Any ideas?

Wain
  • 118,658
  • 15
  • 128
  • 151
Etep
  • 533
  • 7
  • 20
  • Are you opening the project from the workspace created by cocoapods? – serrrgi Aug 29 '13 at 09:52
  • Yes I am. It may be that I'm adding RestKit after I've started a project and done some coding on it. I believe I added a framework or two. I'm investigating that now. – Etep Aug 29 '13 at 16:19
  • Ok so I created a new project from scratch, added in RestKit and everything is fine. I then added all my other source files and all is good with that too. However if I tried to add any RestKit code to any other source file either than the one I originally setup, I get these same errors. I'm at a loss now. – Etep Aug 31 '13 at 19:43

1 Answers1

0

Finally solved the issue.

The problem was that cocoapods does not set the target configuration on multiple targets in a project. I had my main target and a test target. Shame on me for doing unit tests. :)

Pictures explains this best and I'd like to post a link to the original answer and give credit to that user who posted it. Thanks Waggles!

Solution at this link...

https://stackoverflow.com/a/16703468/1790578

I hope this helps others in the future.

Community
  • 1
  • 1
Etep
  • 533
  • 7
  • 20