File "FacebookSDK / FacebookSDK.h" not found

I already installed the latest version of phonegap-facebook-plugin But when I create the project, I got the error message below. I tried many solutions mentioned in stackoverflow and other sites without a positive result.

com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m:11:
Et3arrafApp/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.h:11:9: fatal error:
      'FacebookSDK/FacebookSDK.h' file not found
#import <FacebookSDK/FacebookSDK.h>
        ^
1 error generated.

** BUILD FAILED **


The following build commands failed:
    CompileC build/Et3arrafApp.build/Debug-iphonesimulator/Et3arrafApp.build/Objects-normal/i386/FacebookConnectPlugin.o Et3arrafApp/Plugins/com.phonegap.plugins.facebookconnect/FacebookConnectPlugin.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: /Users/apple/Desktop/et3arraf/platforms/ios/cordova/build: Command failed with exit code 65
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:753:16)
    at Process.ChildProcess._handle.onexit (child_process.js:820:5)
+4
source share
3 answers

Today I faced the same problem.

Installing this plugin using the register of the plugin does not work (for iOS) at the moment.

You have to clone the repository ( phonegap-facebook-plugin) into the local file system, say $HOME/src/phonegap-facebook-plugin. Then install a plugin pointing to this path, for example.cordova plugin add $HOME/src/phonegap-facebook-plugin ...

, FacebookSDK.framework . :

$ ls -l plugins/com.phonegap.plugins.facebookconnect/platforms/ios/FacebookSDK.framework/
total 24
lrwx------  1 mjl  staff   24 Aug 15 15:23 FacebookSDK -> ./Versions/A/FacebookSDK
lrwx------  1 mjl  staff   20 Aug 15 15:23 Headers -> ./Versions/A/Headers
lrwx------  1 mjl  staff   22 Aug 15 15:23 Resources -> ./Versions/A/Resources
drwx------  4 mjl  staff  136 Aug 15 15:23 Versions

... .

+12

, --save.

, :

cordova plugin add --save <my downloaded plugin directory> --variable APP_ID=<app_id> --variable APP_NAME=<app_name>

@mjl ls -l plugins/com.phonegap.plugins.facebookconnect/platforms/ios/FacebookSDK.framework/

P/S: iTerm, iTerm, .

+1

, FacebookSDK

ln -s./Versions/A/Headers Headers

..

-2

Source: https://habr.com/ru/post/1547554/


All Articles