Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity iOS project 'FBSDKShareKit/FBSDKShareKit.h' file not found

Discussion in 'iOS and tvOS' started by Asseks, Jan 4, 2020.

  1. Asseks

    Asseks

    Joined:
    Nov 22, 2019
    Posts:
    13
    I use Unity 2019.3.0f3 for export Unity to iOS as Framework. And when I open exported iOS project I get the issue
    upload_2020-1-4_14-57-1.png

    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.

    How can I figure out it?
     
    IgorAherne likes this.
  2. FardinHaque

    FardinHaque

    Joined:
    Apr 13, 2015
    Posts:
    3
    Have you managed to find out any solution? Facing this issue here as well.
     
  3. Asseks

    Asseks

    Joined:
    Nov 22, 2019
    Posts:
    13
    I downgraded FacebookSDK to 7.16.1
     
    FardinHaque likes this.
  4. FardinHaque

    FardinHaque

    Joined:
    Apr 13, 2015
    Posts:
    3
    Thanks!! That did the trick!
     
  5. akasurreal

    akasurreal

    Joined:
    Jul 17, 2009
    Posts:
    440
    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

    Once I turned that on, I got stuck at a different issue though that appears to not have been fixed by facebook yet:
    https://github.com/facebook/facebook-sdk-for-unity/issues/350

    I used a workaround suggested here:
    https://github.com/facebook/facebook-ios-sdk/issues/1102

    Changing the FacebookSDK/Plugins/Editor/Dependencies.xml to use an earlier version of the Facebook SDK worked:

    <iosPods>
    <iosPod name="FBSDKCoreKit" version="5.8.0" />
    <iosPod name="FBSDKLoginKit" version="5.8.0" />
    <iosPod name="FBSDKShareKit" version="5.8.0" />
    </iosPods>
     
    Last edited: Jan 15, 2020
  6. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    171
    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.
     
    Last edited: Mar 2, 2020
  7. Brogan89

    Brogan89

    Joined:
    Jul 10, 2014
    Posts:
    165
    Checking `Podfile Generation` seems to be the correct fix.
    I have also posted it here in related github issue
     
  8. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    171
    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.
     
unityunity