No matter what I do (I may be doing it wrong) When I try to build my unity IOS app for testing, Xcode always says ‘FBSDKShareKit/FBSDKShareKit’.h file not found.
I’ve added the Facebook SDK indicated in the Quick Start for iOS in the Xcode Project. From the Facebook SDK folder, dragged the folder FBSDKCoreKit.Framework, FBSDKLoginKit.Framework, FBSDKShareKit.Framework into your Xcode Projects Framework folder. Then configured info.plist as stated and of course supplied the bundle identifier. And it gives the same problem. Honestly I have spent more than 6 weeks on this single issue. I’m in the verge of mental and physical collapse and close to be fired. Please give some kind of advice. I’ve tried all the other answers in this same page but non work. Please help!!
If you haven't installed cocoapods first:
sudo gem install cocoapods
then go to your Xcode project directory and do
pod install
it should create a .xcworkspace open it and build your project. You will have no problem.
The .xcworkspace must be created by cocoa pods not Unity. Sometimes unity creates it so it's missing Pods that's why Xcode can't find some libraries.
I had this problem with XCode 10!!! Sorted in this way:
Libraries > RCTFBSDK.xcodeproj
Build Settings > Framework Search Paths
~/Documents/FacebookSDK
to $(HOME)/Documents/FacebookSDK
(with parentheses!)Believe it or not, now it works!
If you're here because you're trying to use facebook/react-native-fbsdk, then you only need to add the following line to your Podfile:
pod 'FBSDKShareKit'
Then
pod install
Build and run!
I got the same issue and solve problem.<> My solution : 1. follow the steps from https://developers.facebook.com/docs/react-native/getting-started-ios 2. check the xcode proj -> Library, find and open file RCTFBSDK.xcodeproj then update fb sdk path in build setting->Framework search path.
It works. I guess that sometime the RCTFBSDK.xcodeproj in Library can not update the framework search path from main xcodeproj so we need done manually. Hopefully my solution can help you, Thanks.
Drekka I was finally out of the game, until I read this answer and it gave my an Idea to try something different. This is what finally worked for me: The Framework Search Path was set wrong I it was such I tiny detail I wuold never noticed it if I was wasn't obsessed about it: In target - build settings - search paths - frameworks search paths change from:
$(inherited) $(PROJECT_DIR)/Frameworks\Plugins/iOS/Facebook (look at the wrong direction of the first slash)
to
$(SCROOT) $(inherited) $(PROJECT_DIR)/Frameworks/Plugins/iOS/Facebook
This is finally it I can go to sleep now!Thanks drekka!
If you think you've done everything right but it still is not working, then make sure the FB [LoginKit, ShareKit, and CoreKit] are in your "Copy Bundle Resources".
This took me hours to figure out, hope it can help others!
Hard to tell what your problem is and I've never used those frameworks. But it sounds like you may have added them to the project in terms of linking against them during compilation, but they are not being added to the final app bundle.
This may or may not help, but based on what you have said, it's what I would look at. Check your 'Build Phases'. You should see the frameworks in the 'Link Binary With Libraries' phase. You then need to look for a phase ( or add one if it's not there) which is a 'Copy files Phase'. Add one by choosing 'New Copy Files Phase' after clicking the '+' at the top of the list.
In the 'Copy Files Phase', set the 'Destination' to 'Frameworks' and then add the Facebook frameworks to the list of file to copy.
Another option which may also work if the above doesn't is to check the 'Runpath Search Paths' in your build settings. If it's not set, try setting it to '@executable_path/Frameworks @loader_path/Frameworks'.
Hope this helps.
On macOS, in my case, I followed all the instructions but I still got the error. I check again, the files were "there":
But actually they're on my iCloud account instead (notice the ones with a little cloud icon). So I downloaded those files to my disk and the app successfully compiled !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With