I am trying to add the Facebook SDK to my iOS 8 Objective-C app in Xcode. I did the install according to the FB-dev instructions. However, I get a \"Could not build
Remove Module Directory From FacebookCoreKit.framwork.
For Objective-C I used Paul Lehn answer from: https://developers.facebook.com/bugs/362995353893156/
- Add the -ObjC flag to your project's Other Linker Flags build setting. (if you don't want add to project configs, for initialise buttons classes)
- "Allow Non-modular Includes in Framework modules" setting to YES in Build settings
- Set "Enable Modules" (c and Objective-C) to No
(also don't forget add frameworks, for me it was: "AdressBook" "QuartzCore" "CoreLocation" "CoreGraphics" and if still not added, also "UIKit" "Foundation" "CoreData")
and its finally worked for me
all this used for linked FBSDK in custom folder in my project folder not from ~/Documents/FacebookSDK
TL;DR Remove your Bolts.framework reference in your project.
None of these or any of the other answers worked for me (in my case). For my project we were switching from an older Facebook sdk and we had a Bolts.framework.
Reading the documentation
The SDK automatically loads its framework and resource dependencies.
As such I think there is a collision going on. There was the Bolts.framework I had from before and then the new one that came when I downloaded the new FacebookSDK bundle (4.7 in this case).
Removing my Bolts.framework fixes the problem (be sure to clean before rebuilding).
FBSDKCoreKit can't be built because of "include of non-modular header inside framework module" error in FBSDKAppLinkResolver.h header file: in #import <Bolts/BFAppLinkResolving.h>
line.
The solution from Swift compiler error: "non-modular header inside framework module" (switching CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES) did't help me.
My solution:
Put such code inside
framework module Bolts {
umbrella header "Bolts.h"
export *
module * { export * }
explicit module BFAppLinkResolver {
header "BFAppLinkResolver.h"
link "BFAppLinkResolver"
export *
}}
Interesting fact is that in FBSDKCoreKit such scheme is realized by Facebook, why didn't they apply it into Bolts...