Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter_facebook_login CocoaPods dependency error

I am try add facebook login to Flutter app. I am use flutter_facebook_login. But when I try build for iOS give error:

    Resolving dependencies of `Podfile`
    [!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":
      In Podfile:
        flutter_facebook_login (from `.symlinks/plugins/flutter_facebook_login/ios`) was resolved to 0.0.1, which depends on
          FBSDKLoginKit (= 4.39.1)

    None of your spec sources contain a spec satisfying the dependency: `FBSDKLoginKit (= 4.39.1)`.

    You have either:
     * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
     * mistyped the name or version.
     * not added the source repo that hosts the Podspec to your Podfile.




Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
  pod repo update

Error running pod install
Error launching application on iPhone X.

I no install pod manually because flutter_facebook_login readme say:

(Note: you can skip "Step 2: Set up Your Development Environment").

Anyone help? Thanks!

like image 536
FlutterFirebase Avatar asked Apr 09 '19 16:04

FlutterFirebase


3 Answers

According to this diegoveloper's answer flutter_facebook_login github issue.

https://github.com/roughike/flutter_facebook_login/issues/201

  • flutter clean
  • Remove ios/Podfile.lock file
  • Go to the Podfile file and changed from platform :ios, '9.0' to platform :ios, '11.0' (In my case, some libs don't support 11.0 and I use platform :ios, '9.0 then set deployment target in runner.xcsworkspace to 9.0 and it work.)
  • Go to the terminal , ios directory and run pod install
  • Run the project again.

just update your podfile .

platform :ios, '11.0'

try to pod install again in terminal. pod install

like image 38
Mir Mahfuz Avatar answered Oct 07 '22 21:10

Mir Mahfuz


  1. open terminal and go to root package directory using cd the_root_package_path
  2. type flutter clean
  3. open podfile and uncomment : # platform :ios, '11.0'
  4. run pod install

had the same problem, tried everything, this worked for me.

like image 36
Micky Kroitoro Avatar answered Oct 07 '22 20:10

Micky Kroitoro