I am coding an iOS 8 app in swift using the FBSDK to allow users to log in to my app. So far I have successfully implemented the login feature using the FBSDK v3.25 in swift using a Bridging-Header.h file and updating the info.plist accordingly to the instructions given on the FB developers website. Now I want to make an app (or update my current one) to FBSDK v4.01 but when I follow the same process of integrating it into my app I get the following errors:
-> FBSDKAppLinkResolver.h
/Users/danieloram/Desktop/IOS/SWIFT/FBLoginUsingSDK4/FacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKAppLinkResolver.h:21:9: Include of non-modular header inside framework module 'FBSDKCoreKit.FBSDKAppLinkResolver'
/Users/danieloram/Desktop/IOS/SWIFT/FBLoginUsingSDK4/FacebookSDK/FBSDKCoreKit.framework/Headers/FBSDKAppLinkResolver.h:21:9: Include of non-modular header inside framework module 'FBSDKCoreKit.FBSDKAppLinkResolver'
-> Bridging-Header.h
/Users/danieloram/Desktop/IOS/SWIFT/FBLoginUsingSDK4/FBLoginUsingSDK4/Bridging-Header.h:12:9: Could not build module 'FBSDKCoreKit'
/Users/danieloram/Desktop/IOS/SWIFT/FBLoginUsingSDK4/FBLoginUsingSDK4/Bridging-Header.h:13:9: Could not build module 'FBSDKLoginKit'
/Users/danieloram/Desktop/IOS/SWIFT/FBLoginUsingSDK4/FBLoginUsingSDK4/Bridging-Header.h:12:9: Could not build module 'FBSDKCoreKit'
->FBSDKLoginButton.h
/Users/danieloram/Desktop/IOS/SWIFT/FBLoginUsingSDK4/FacebookSDK/FBSDKLoginKit.framework/Headers/FBSDKLoginButton.h:21:9: Could not build module 'FBSDKCoreKit'
Failed to import bridging header '/Users/danieloram/Desktop/IOS/SWIFT/FBLoginUsingSDK4/FBLoginUsingSDK4/Bridging-Header.h'
The most obvious thing to note is the last error which says the bridging header cannot be found but it is in the same place as it was for when I was using FBSDK 3.25?
Also, all of the documentation and tutorials on the FaceBook developers website are all in obj-c so finding a solution has been a very frustrating process. Can anyone help diagnose what i am doing wrong? Any help is appreciated!
update
for the time being I have managed to compile my app by following the instructions in the Facebook developers portal and removing all modules from the FBSDK by running the following in terminal
rm -r ~/Documents/FacebookSDK/FBSDKCoreKit.framework/Modules/
rm -r ~/Documents/FacebookSDK/FBSDKLoginKit.framework/Modules/
rm -r ~/Documents/FacebookSDK/FBSDKShareKit.framework/Modules/
this is my workaround until a proper fix is released.
In Xcode, click File > Swift Packages > Add Package Dependency. In the dialog that appears, enter the repository URL: https://github.com/facebook/facebook-ios-sdk. In Version, select Up to Next Major and the default option. Complete the prompts to select the libraries you want to use in your project.
The Facebook SDK is what allows mobile app developers to integrate Facebook within a mobile app. SDK stands for software development kit, and it allows for a website or app to integrate with Facebook seamlessly.
This open-source library allows you to integrate Facebook into your iOS app. Learn more about the provided samples, documentation, integrating the SDK into your app, accessing source code, and more at https://developers.facebook.com/docs/ios.
This is a bug and Facebook is currently "assigning this to the appropriate team".
To get updates to this issue follow this link:
https://developers.facebook.com/bugs/362995353893156/
and hit subscribe.
Some people have found success using the answers on this link (none have worked for me):
Facebook iOS8 SDK build module error for FBSDKCoreKit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With