Facebook SDK 4.0.1 Quick xcode 6.2 iOS 8.2 errors

Here in this change log ( facebook change-log ) it is stated that there is no need for objective-c header headers for swift.

But when I import FBSDKCoreKit in AppDelegate.swift , the following errors occur:

FBSDKAppLinkResolver.h

/ Users / [username] /Documents/FacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKAppLinkResolver.h:21:9: Include a non-modular header inside the 'FBSDKCoreKit.FBSDKAppLinkResolver' frame module

AppDelegate.swift

/Users/ashrafkholeif/Projects/xcode/TabbedApplicationTemplate/TabbedApplicationTemplate/TabbedApplicationTemplate/AppDelegate.swift:10:8: Failed to create objective-c module 'FBSDKCoreKit'

edit: I even set the resolving non-modular header inside the YES framework modules.

+6
source share
4 answers

I had the same problem, the solution proposed at fooobar.com/questions/38927 / ... for the Objective-C project worked right away in my Swift project:

Write a new file in the Facebook SDK folder under Bolts.framework / Modules / module.modulemap with the following contents:

 framework module Bolts { umbrella header "Bolts.h" export * module * { export * } explicit module BFAppLinkResolver { header "BFAppLinkResolver.h" link "BFAppLinkResolver" export * }} 

This works without combining the headers (no longer required in version 4.0.1 of the SDK, as indicated by the OP) and without changing the build settings.

EDIT: this bug is now fixed from version 4.1 of the SDK for Facebook, the library works without any changes.

+7
source

This is a mistake, and Facebook is currently "assigning it to the appropriate team."

To get updates on this issue, follow this link:

https://developers.facebook.com/bugs/362995353893156/

and click subscribe.

Hope it doesn’t take too long to fix.

There is also a related question recently posted on SO:

using FBSDK in a fast iOS application

And some people found success using the answers to this link (no one worked for me):

IOS8 Module Build Module Error for FBSDKCoreKit

+2
source

The fix that worked for me:

 rm -r ~/Documents/FacebookSDK/FBSDKCoreKit.framework/Modules/ 

Repeat with other frameworks.

Source: https://developers.facebook.com/docs/ios/troubleshooting#xcode_link

+2
source

Create a new header file and import the objective-c code that you are using, something like this.

 #ifndef RJv1_RJBridge_h #define RJv1_RJBridge_h #import "NSMutableString+Obfuscated.h" #import <FBSDKCoreKit/FBSDKCoreKit.h> #import <FBSDKLoginKit/FBSDKLoginKit.h> #endif 

Then go to the build settings, find the Install Objective-C Compability Header and make sure that Yes , then add the relative path to your header file in the Objective-C Bridging Header field.

Hope it works!

+1
source

Source: https://habr.com/ru/post/984680/


All Articles