How to make Xcode find file FacebookSDK.h?

前端 未结 17 2089
情歌与酒
情歌与酒 2020-12-02 20:23

It says \"FacebookSDK/FacebookSDK.h file not found\"

Yet I can jump-to-definition on the #import and it takes me to the file.

And once I added the #import i

相关标签:
17条回答
  • 2020-12-02 20:50

    I got this problem today.

    It turns out I need to have my Framework search path in all three places:

    1) Project Build Settings
    2) App Target Build Settings
    3) UnitTests Target Build Settings
    

    My search path is:

    /Users/myusername/Documents/FacebookSDK
    

    After ensure that, the error disappeared for me.

    0 讨论(0)
  • 2020-12-02 20:50

    The only solution I found was:

    1. Remove the phonegap plugin: ionic plugin rm phonegap-facebook-plugin

    2. Clone the next plugin git clone: https://github.com/jeduan/cordova-plugin-facebook4.git

    3. Add the plugin manually: cordova -d plugin add PATH/cordova-plugin-facebook4 --variable APP_ID="*****" --variable APP_NAME="*****"

    Before this a tried to re add FacebookSDK.framework and installed the phonegap plugin facebook through a locally cloned, but the error continues.

    0 讨论(0)
  • 2020-12-02 20:52

    This happens if you have imported the facebookSDK twice and after having deleting some files.

    For example, I imported the facebookSDK in $project/framework but I deleted it for some reasons. Then I imported it via ~/Documents/FacebookSDK but Xcode kept the old folder and search in it by default.

    I have to remove all references and files of the old import to resolve my issue.

    0 讨论(0)
  • 2020-12-02 20:55

    besides adding the search path I also had to set the paths to recursive and remove "*.framework" from the "Sub Directories to Exclude" option for this to work.

    0 讨论(0)
  • 2020-12-02 20:55

    Follow the instruction At step 4 Configure your Xcode Project I think you missing something. Delete the Facebook.sdk in your project and try again.

    0 讨论(0)
提交回复
热议问题