How to make Xcode find file FacebookSDK.h?

前端 未结 17 2158
情歌与酒
情歌与酒 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:40

    Ok guys, I think i got the answer. Follow the steps given below.

    1. Copy your framework into your project.
    2. Make sure it is under some directory. e.g. $(PROJECT_DIR)/project_name/Resources/Frameworks
    3. Click on the target.
    4. Goto Build Phases→Link binary with Libraries
    5. Add the custom framework by clicking "Add Other"
    6. Verify in the project navigator that the framework exists only once.
    7. Now goto Build Settings→Search Paths→Framework Search Path and make sure that it has the following two things.

      (a) $(inherited) (b) $(PROJECT_DIR)/project_name/Resources/Frameworks.

      Not to remind the framework exists inside the Frameworks folder

    8. Make sure that there is nothing in the library search path.
    9. Now click on the project (above target)→Build settings and repeat steps 7 and 8.
    10. Now clean the project and build the project.

    Hope it works. Please remember not to keep any folder names with spaces. If you have kept them, make sure that you provide the correct escape characters.

提交回复
热议问题