Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: Making Podfiles work

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?

like image 498
Bram Vanbilsen Avatar asked Apr 09 '26 16:04

Bram Vanbilsen


1 Answers

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
like image 126
KKRocks Avatar answered Apr 12 '26 07:04

KKRocks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!