Facebook SDK integration in iOS shows Error "Receiver 'Facebook' for class message is a forward declaration"

150 views Asked by At

I am using Facebook-iOS-SDK for integrating the Facebook in my app. (The SDK is installed using cocoaPods) It always showing an error "Facebook.h not found" error when I try to import the Facebook.h class.

And I tried the @class Facebook; in my view controller's .h class and created the Facebook class instance. But i can't call any method of that class, when trying to call a method, it shows an error " Receiver 'Facebook' for class message is a forward declaration"

Is there any way to use the methods in the Facebook.h class.

Thanks for any help.

1

There are 1 answers

4
rameez On

Hi Neenu if you are using OS X Yosemite, try updating the command line tools and reinstalling pod file also you can try to set the path of Xcode using this command :

sudo xcode-select --switch "/Applications/Xcode6-Beta6.app/Contents/Developer".

If this doesn't solve the issue there is problem with pod file installation.Hope it helps