Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity 2019.2 , FacebookSDK and IOS xcode build error: FBSDKShareKit/FBSDKShareKit.h file not found

Discussion in 'iOS and tvOS' started by vadim-ingvarcompany, Aug 24, 2019.

  1. vadim-ingvarcompany

    vadim-ingvarcompany

    Joined:
    Mar 9, 2018
    Posts:
    2
    Xcode version: 10.3
    Facebook SDK version: 7.17.2

    Recently i updated Unity Facebook SDK to version 7.17.2. Now i can no longer build and publish my project.
    The issue is when i build project in xcode, i got this error:
    'FBSDKShareKit/FBSDKShareKit.h' file not found

    I read questions regarding similar problem, like this thread: https://github.com/facebook/react-native-fbsdk/issues/475
    The solution proposed is to edit framework search paths and add path to facebook sdk.
    But it does not working for me.

    Here is the screenshot of xcode project structure and code with error: https://imgur.com/a/rQSUaEl
     
  2. StefanoCecere

    StefanoCecere

    Joined:
    Jun 10, 2011
    Posts:
    210
    same problem :(
     
  3. StefanoCecere

    StefanoCecere

    Joined:
    Jun 10, 2011
    Posts:
    210
    uhm.. i think i solved that error by resetting the iOS PlayServices resolver settings to default
    now i got a new error (doesn't find libraries.. but at a later stage of compilation
     
  4. StefanoCecere

    StefanoCecere

    Joined:
    Jun 10, 2011
    Posts:
    210
    i fixed going back to FB SDK 7.16.1 (the last version that doesn't used Pods/Maven to download the libraries)
     
    Asseks likes this.
  5. EightGreatGamesLLC

    EightGreatGamesLLC

    Joined:
    Sep 25, 2017
    Posts:
    4
    getting the same error any body have fixed it, i cannot roll back to any previous version
     
  6. caolam

    caolam

    Joined:
    Nov 12, 2018
    Posts:
    2
    buzz, i am getting the same error, any progress?
     
  7. Rafael-cmk

    Rafael-cmk

    Joined:
    Jun 28, 2016
    Posts:
    55
    Same problem here, I am completely lost on what to do.
     
  8. Moonfy

    Moonfy

    Joined:
    Jan 10, 2015
    Posts:
    1
    I gonna tell how i solved:
    > before importing new fb sdk delete facebooksdk and play services resolver folders from assets if you have an older version of fbsdk.
    > after import new fb sdk and write down your fb app id & name, click on assets>play services resolver>ios resolver> install cocoapods. build project and transfer your files to Mac (if you are not already using Mac of course)
    > on Mac, open terminal, move to project's folder (for people who don't know it's "cd /Project Path/") and run that command "pod install", wait for a few minutes. it will install all necessary files which already told in Pod file by unity
    > now open .xcworkspace file and build.

    A few possible problems:
    > if you get stuck after write pod install and it doesn't seem like cloning repo but says it is cloning, just cancel it and delete first line from Pod file with text editor. after that run pod install again
    > if you are someone who transfer files from Windows like me, you may encounter to permission errors. to fix it move to project folder in terminal and run this command "chmod +x filename"
     
    Patomanriquezb likes this.
  9. RamonKing

    RamonKing

    Joined:
    Dec 13, 2019
    Posts:
    10
    Well said,you are smart.
     
  10. HouseFrog

    HouseFrog

    Joined:
    Jan 14, 2016
    Posts:
    29
    The solution for me was to install 7.15.1 + removed #include "RegisterMonoModules.h" from FBunityInterface.h

    Cocoa only worked for me when building on Mac using 2019.2.17 + opening the xcode workspace file after pod install.

    This is the main support forum for Facebook SDK:
    https://github.com/facebook/facebook-sdk-for-unity
     
    Last edited: Jan 7, 2020