Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such module FBSDKCoreKit error

I am trying to add the Facebook SDK to my iOS 9.0 Swift app in Xcode. I did the install according to the FB-dev instructions. However, when I add the header to my AppDelegate.m file import FBSDKCoreKit I keep getting a message saying "No such module 'FBSDKCoreKit'" error .

Based on what I read elsewhere

  1. I have already cleaned the build and re-installed Xcode and updated my OS X
  2. I have double checked the plist and the framework files FB lists in the instructions, but nothing has seemed missing.
  3. I have set the "Allow Non-modular Includes in Framework modules" setting to YES in Build settings.

Nothing seems to work. I do not know where to go from here and have done hours of research trying to find the solution.

like image 736
Cristina Zalucky Avatar asked Aug 19 '15 13:08

Cristina Zalucky


3 Answers

When you are importing the frameworks, Make sure you have selected "Copy if needed" . Version after Xcode 6.3 seem to be giving issues if this part is NOT ticked.

like image 118
Jignesh Avatar answered Nov 19 '22 18:11

Jignesh


I solved this by deleting the Framework and adding it again by right click on the project->Add files..., then choose the framework and SELECT the option to Copy files if needed. It's not what Facebook recommends, but it worked! I'm using v4.6 of FBSDK and Xcode 7 beta 6. Hope it helps you and everyone else who's facing the same problem :)

like image 41
maufadel Avatar answered Nov 19 '22 17:11

maufadel


With CocoaPods, swift 2.1, and iOS 9, I tried adding it to the bridge header and it works fine, for example:

#ifndef MY_Bridge_Header_h
#define MY_Bridge_Header_h

#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
// ... other imports

#endif /* MY_Bridge_Header_h */
like image 1
Yuchen Avatar answered Nov 19 '22 17:11

Yuchen