Facebook iOS8 SDK build module error for FBSDKCoreKit Facebook iOS8 SDK build module error for FBSDKCoreKit objective-c objective-c

Facebook iOS8 SDK build module error for FBSDKCoreKit


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:

  1. Create in Bolts.framework file module map: Modules/module.modulemap (like in FBSDKCoreKit.framework)
  2. 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...


Not sure if it has side effects but setting the "Allow Non-modular Includes in Framework modules" setting to YES in Build settings solved the problem for me. Hope it works for you too.


Just doing the following let me to build the app successfully.

In Build settings Set "Allow Non-modular Includes in Framework modules" flag to YES

And I didn't want to Set "Enable Modules" (c and Objective-C) to NO

enter image description here