roughike / flutter_facebook_login

A Flutter plugin for allowing users to authenticate with native Android & iOS Facebook login SDKs.
BSD 2-Clause "Simplified" License
405 stars 331 forks source link

Avoid the "fatal error: module 'FBSDKCoreKit' not found" error on IOS with latest FaceBook SDK #217

Open smourier opened 4 years ago

smourier commented 4 years ago

I've just added a FBSDKCOCOAPODS define that allows the code to compile, as https://github.com/facebook/facebook-ios-sdk/blob/master/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h now defines this :

...
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
#endif
...
ksheremet commented 4 years ago

That would be relying on an implementation detail -- wouldn't the "Right Thing To Do" be enabling modular_headers (see #214)?

smourier commented 4 years ago

I've not tested what you proposed, I've only tested my change. I'm not enough of an expert in iOS to be sure what's the "right thing to do". Yet, I'm pretty sure the bad thing to do is change version target like others proposed in #214 .