Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'FBSDKLoginKit/FBSDKLoginKit.h' file not found (Facebook SDK for iOS v4.2 & Xcode 7)

I follow all the steps in This Tutorial and/or Facebook SDK Documentation to install Facebook Login on my App, but when I run the code I get an error. although Facebook mention I can just use import (Swift) to include the framework, I try to do it the old fashion as well with Objective-C Bridge Header.

Error:

'FBSDKLoginKit/FBSDKLoginKit.h' file not found

Screenshot
As you can see the bridge.h is being read by the compiler, but due to internal file error it will throw error.

enter image description here

Bridge.h
In Xcode 6 you don't require bridge header file, I could just do it with import

#import <FBSDKLoginKit/FBSDKLoginKit.h>

This problem is due to Xcode 7 Beta, I have tried to do it on Xcode 6 and it worked perfectly with just an import FBSDKLoginKit. Can anyone tell me a hack around this? or if there is a way to convert my Swift 2 code back to 1.4 and work on Xcode 6.

like image 369
Brian Nezhad Avatar asked Jun 10 '15 00:06

Brian Nezhad


3 Answers

I had the same problem.

Managed to sort the directory by adding the Facebook SDK in "Framework Search Path".

Target -> Build Settings -> Framework Search Paths -> + /Users//Documents/FacebookSDK

it works!

=]

like image 172
Darma Avatar answered Nov 04 '22 16:11

Darma


For those using cocoapods the solution for me was actually adding FBSDKCoreKit to podfile:

pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'

The facebook documentation is incomplete, they dont mention anything about including FBSDKCoreKit pod reference.

like image 27
Karlo A. López Avatar answered Nov 04 '22 16:11

Karlo A. López


For [login,sharekit,corekit].h file not found error , My solution was:

changing framework searchpath of RCTFBSDK (inside library of the project)

~/Documents/FacebookSDK 

to

$(HOME)/Documents/FacebookSDK
like image 2
ishab acharya Avatar answered Nov 04 '22 17:11

ishab acharya