2

I've downloaded Facebook SDK and imported manually to my project throw link binary with library. And what I am having here is that after closing the project I get two warnings say:

ld: warning: directory not found for option '-F/Users/user/Desktop/iOS/Source Code/projectname/Controls/Facebook'
ld: warning: directory not found for option '-FSDK'

And when I try to run the project I get:

/Users/user/Desktop/iOS/Source Code/projectname/ViewControllers/RegistrationViewController.h:14:9: error: 'FBSDKCoreKit/FBSDKCoreKit.h' file not found
#import <FBSDKCoreKit/FBSDKCoreKit.h>
        ^
<unknown>:0: error: failed to import bridging header '/Users/user/Desktop/iOS/Source Code/projectname/ViewControllers/projectname-Bridging-Header.h'

So each time I run the app I have to remove the Facebook frameworks and add them again so the error disappear but the warning is still there ! Any solution ?

Bindiya
  • 614
  • 2
  • 9
  • 23
Nata Mio
  • 2,168
  • 3
  • 22
  • 46
  • See this [quick solution](http://stackoverflow.com/questions/34046676/file-not-found-in-bridging-header-when-importing-objective-c-frameworks-into-s/34046677#34046677) – childrenOurFuture Dec 09 '15 at 02:04

1 Answers1

0

In your project have a HeaderFile to use Objective-C Class in swift. if doen't then make Headerfile as below name.

  1. Make Header file.

    projectname-Bridging-Header.h
    
  2. adding #import "FBSDKCoreKit/FBSDKCoreKit.h. in Header file.

  3. go to Project > Build Setting

  4. search Objective-C bridging Header

enter image description here

  1. drag and drop Header file. if file path is already then remove and add again as below.

enter image description here

How to use Swift with ObjectiveC project.

Community
  • 1
  • 1
Kirit Modi
  • 23,155
  • 15
  • 89
  • 112