FacebookSDK with Continuous Integration - Xcode

251 Views Asked by At

I've got a project on Xcode which works with FacebookSDK. As recommanded by facebook, the SDK is installed on ~/Documents/FacebookSDK, and in my Build Settings, I had this path to the "Framework Search Paths" part. Everything works fine, but I'm trying to use Continuous Integration with Xcode Server, and when I try to integrate my project, it can't find the FacebookSDK (I've got this error message : "Issue: 'FacebookSDK/FacebookSDK.h' file not found.").

I thought it was because the build is made on the server, so I installed FacebookSDK on "~/Documents/FacebookSDK" on the server, but the issue is still here. What can I do?

3

There are 3 best solutions below

1
On BEST ANSWER

Ok I finally found the solution.

--> Simply add the path to "Libray Search Path". (something like "$(SRCROOT)/Vendor/FacebookSDK")

I don't understand why we don't need this stuff for build and run but for CI, but it works now.

3
On

Simply follow this steps:

  • Remove old path from Header Search path

  • Make sure your FacebookSDK is in your project folder

  • Go to Targets -> Build Phases -> Link Binary With Libraries

  • Click on + than go to app folder & select Facebook SDK

  • It will set the actual path of SDK

  • After that clean project & make build

Hope it will help.

0
On

For those who are working with React Native (React Native FBSDK), put $(PROJECT_DIR)/../Frameworks/FacebookSDK in Framework Search Paths on RCTFBSDK.xcodeproj after moving FB SDK to ios/Frameworks. It will work.