3

I am trying to build a Cocoapod xcode project. I followed below steps to configure cocoapods on my mac machine(MAC OS yosemite 10.10.2, xcode 6.1.1 version)

  • sudo gem update --system
  • sudo gem install cocoapods
  • pod setup
  • and then navigated to existing cocoapod xcode project root directory entered pod update

Now while opening xcode workspace file, am getting the below error in projectname-Prefix.pch file

"ReactiveCocoa/ReactiveCocoa.h" file not found (but I see library and class file in the project)

Nagendra
  • 193
  • 4
  • 14

3 Answers3

4

In my case it was resolved like this way..

After opening terminal -> Goto the project directory

cd /Your Xcode Project Directory Path

Press Enter.

Now use this command to check if there is any update available for existing pods.

pod outdated

It will show all the outdated pods with latest updates

Now use the following command to update the outdated pods.

pod update

It will update all the pods automatically.

Make sure that you have closed the Xcode before updating.

After updating change the import section of your class files.

#import <ReactiveCocoa/ReactiveCocoa.h>

Thanks.

Hope this helped.

onCompletion
  • 6,500
  • 4
  • 28
  • 37
0

I had the same issue, and I solved it by adding the ReactiveCocoa framework to TARGETS -> General -> Linked frameworks and libraries, then error was gone.

mylittleswift
  • 320
  • 2
  • 8
0

Beyond updating the import to (like @onCompletion mentioned above):

#import <ReactiveCocoa/ReactiveCocoa.h>

also add this to your target's "Header Search Paths":

"${PODS_ROOT}/Headers/Public/ReactiveCocoa"

If it still doesn't works, also add this to your target's "Other Linker Flags":

-l"ReactiveCocoa"
Ricardo Barroso
  • 634
  • 9
  • 11