but I can navigate to this header use “Cmd+click”.
I googled and tried almost all solutions which I could find I tried set home directory for Framework Search Path to ‘$(HOME)/Documents/FacebookSDK’ also tried set FBSDKShareKit.Framework as embeddedFramework and install Pods. Nothing helped.
This issue appears to be first related to not having podfile generation turned on in play services resolver. You can find that here: Assets/Play Services Resolver/iOS Resolver/Settings
This didnt work for me, using Facebook sdk 7.18-2.1 and Unity 2019.2.21
EDIT. It did work finally, I don’t know what I was doing wrong.
Still this is quite strange, the Facebook GitHub issues are closed but this still need to be fixed manually by changing the dependencies file. At least from Unity, and I’m using the last Facebook sdk 7.18-2.1 launched in February which change log says this problem is fixed.
Im recently getting again the exception in Unity console after build: FileNotFoundException: Could not find file “…/Libraries/RegisterMonoModules.h”
My dependencies are still the same, not sure why this happens but it lets me build successfully.
Downgrading facebook sdk version is just a temporary solution, the root cause of this error is corrupt installation of cocoapods.
Even if unity says that cocoapods is installed it doesn’t always mean that it’s installed for real. To make sure, open your terminal and type ‘pod’ then hit enter, if it says that command not found then your cocoapods installation is broken. To fix this, run this command in terminal ‘sudo gem install cocoapods’.
Even after fixing cocoapods installation, facebook error may persist. Then try deleting unity generated xcode project, and build it again.
I have another question, do I have to run pod install everytime I update my unity project and build xcode for iOS?
Even though it using the same FBSDK version
Great job, Facebook! Another broken SDK that wastes a ton of developer time. Do they even QA this? And why doesn’t Unity do something about it?
Specifically, it’s been over 2 months since the Facebook SDK release and developers are left to figure out why their apps are insta-crashing. Should be an immediate patch-fix, right?
I tried this commands It’s work and know I can build. you need open your terminal and go to you XCode Folder then excite this commands lines. If it now work try repeat second time.
Try opening Xcode using the .xcworkspace file instead of .xcodeproj. And if you’re building it via Jenkins, make sure to pass the xcodeWorkspaceFile parameter.