Facebook iOS8 SDK build module error for FBSDKCoreKit

后端 未结 16 1630
生来不讨喜
生来不讨喜 2020-11-30 21:33

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

16条回答
  •  长情又很酷
    2020-11-30 22:09

    I should direct you to this current open issue assigned to Facebook: https://developers.facebook.com/bugs/362995353893156/. None of the answers here helped me, so I assume we just sit ducks:

    As at time of writing, a message from Facebooks Chris Pan:

    "The 4.0.1 release added module maps (which should have obviated the need for bridging headers) but it looks like that may have caused some other compatibility issues. We're working on a proper fix but another workaround is to remove the module maps manually from each of the FBSDK*Kit.framework bundles; e.g., rm -r ~/Documents/FacebookSDK/FBSDKCoreKit.framework/Modules/ (and repeat for FBSDKLoginKit and FBSDKShareKit)"

    Kosala Ubayasekara got it to work, but since this is an open issue you might want to simply wait until an official fix is clear:

    1. In Build Settings under Apple LLVM Modules:

      1. Set Allow Non-modular Includes in Framework modules" setting to NO
      2. Enable Modules (C and Objective C) to NO.
    2. Create a bridging header to include the Facebook SDK headers

    3. Link bridging header in Build Settings : Swift Compiler - Code Generation.
    4. Import FBSDKCoreKit into your App Delegate file and implement the core Facebook SDK requirements as per the FB documentation

提交回复
热议问题