I'm trying to add the Facebook SDK to one of my Flutter projects. In a regular Podfile, it'd look something like this:
# Pods for facebooklogintest
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod ‘FBSDKLoginKit’
With "facebooklogintest" being the name of my project. The Podfile in Flutter projects looks a bit different. Is it correct to add the pod files under "# Pods for Runner"?
# Pods for Runner
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod ‘FBSDKLoginKit’
I'm getting the following error when I try to install it as shown above:
[!] Invalid `Podfile` file: Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework.
Where and to where should I point this file to get rid of this error?
Try this :
def fbPods
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod ‘FBSDKLoginKit’
end
target 'facebooklogintest' do
fbPods
end
target 'Runner' do
fbPods
end
Run this command
pod install --no-repo-update
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