React-native-fbsdk: 'FBSDKShareKit/FBSDKShareKit.h' file not found

Created on 8 Feb 2019  路  6Comments  路  Source: facebook/react-native-fbsdk

screen shot 2019-02-08 at 4 10 46 pm
Trying to use facebook login, and getting 'FBSDKShareKit/FBSDKShareKit.h' file not found error for days, any suggestion on how to fix this issue?
i have looked all the issue but i did not find any solution

Most helpful comment

@peymancyb check this solution out https://github.com/facebook/react-native-fbsdk/issues/401#issuecomment-435312536

Which is
Try doing this in XCode (i have 10): go to RCTFBSDK.xcodeproj then build settings->framework search paths. And change ~/Documents/FacebookSDK to $(HOME)/Documents/FacebookSDK It saved me a lot of time. Now it finally gets built.

All 6 comments

@peymancyb check this solution out https://github.com/facebook/react-native-fbsdk/issues/401#issuecomment-435312536

Which is
Try doing this in XCode (i have 10): go to RCTFBSDK.xcodeproj then build settings->framework search paths. And change ~/Documents/FacebookSDK to $(HOME)/Documents/FacebookSDK It saved me a lot of time. Now it finally gets built.

@ckOfor Thank you so much, I have tried all the solutions but I found the solution, I should change the path in Libraries>RCTFBSDK.xcodeproj and then on the Build settings searched for Framework Search path, and then change ~/Documents/FacebookSDK to $(HOME)/Documents/FacebookSDK

thank you so much again for the help

Thanks, everyone, in the end, I solved the issue just dragging and dropping FacebookSDK into the Libraries>RCTFBSDK.xcodeproj --> on the Build settings searched for Framework Search path

TO AVOID type error is better to drag and drop the complete folder.

RCTFBSDK.xcodeproj
Screen Shot 2019-05-03 at 4 01 39 PM

Global project
Screen Shot 2019-05-03 at 4 04 22 PM

Can we have this in the doc, under troubleshooting section?

This is not something someone should manually do because every time u download project dependencies again it is broken again?

Open the terminal.

Check that git is installed by running this command : git --version (otherwise follow this article to install it https://confluence.atlassian.com/crucible045/installing-and-upgrading-git-947848144.html).

Go the root folder of your Xcode generated project by running: cd + " Xcode project path".
Run this command : sudo gem install cocoapods.
Run this command : pod update.
Open again your Xcode project(from .workspace file) and build.

Was this page helpful?
0 / 5 - 0 ratings