Lexical or Preprocessor Issue 'FacebookSDK/FacebookSDK.h' file not found

ChandreshKanetiya picture ChandreshKanetiya · Nov 19, 2013 · Viewed 36.6k times · Source

I just add facebookSDK.framework in ios project through this document :Getting Started with the Facebook SDK for iOS

I have successfully build and run my Xcode project by following it. But when I copy my Source code and run it on another PC following error is coming "Lexical or Preprocessor Issue 'FacebookSDK/FacebookSDK.h' file not found"

I was also add facebookSDK.framework in my Project's resource and try again but not solve it.

So, Please tell me how to do for run this project in other place.

Answer

sffc picture sffc · Dec 31, 2013

I have a very similar issue, but in my case it is with the Amazon Web Services SDK instead of the Facebook SDK. For me the problem turned out to be related to my framework load path.

Solution: Go to "Build Settings" in Xcode, and under "Search Paths" there is a "Framework Search Paths" item. Double-click it and add a new search path: . and make it recursive. Clean and build.

This assumes that your framework is stored somewhere inside your project directory. If not, change the new search path as needed.