I tried to update my Swift project to Facebook SDK v 4.1.0 today (FBSDKCoreKit and FBSDKLoginKit), but it doesn't seem to be working. I cannot import the modules as they are not found.
I basically removed the line
pod 'Facebook-iOS-SDK'
and added the lines
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
and then did a pod install. The Facebook doc says the new SDK supports direct imports, so I tried
import FBSDKCoreKit
in one of my project files, but it says No such module 'FBSDKCoreKit'
I looked around and found the following links which talk about bug with building module, and the Facebook bug report and changelog:
issue using FBSDK in swift iOS application
https://developers.facebook.com/bugs/362995353893156/
https://developers.facebook.com/docs/ios/change-log-4.x
However, it seems to claim that the issue has been fixed in v 4.1.0 (seems to be the main reason for the update), so this isn't the problem in my case? Anyone have any information about this / have a solution?
Try adding use_frameworks!
to the top of your podfile, as suggested by this answer. Here's a blogpost that explains the issue.
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