capacitor-community / facebook-login

Facebook Login support
MIT License
103 stars 52 forks source link

[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit": #71

Closed ggsilva28 closed 2 years ago

ggsilva28 commented 2 years ago

When running "npx cap sync" or "pod install" directly in ios/App i get the following error:

[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
  In Podfile:
    CapacitorCommunityFacebookLogin (from `../../node_modules/@capacitor-community/facebook-login`) was resolved to 3.1.1, which depends on
      FBSDKCoreKit (~> 11.0.0)

    CordovaPluginsStatic (from `../capacitor-cordova-ios-plugins`) was resolved to 3.2.3, which depends on
      FBSDKCoreKit (= 11.1.0)

CordovaPluginsStatic.podspec

  Pod::Spec.new do |s|
    s.name = 'CordovaPluginsStatic'
    s.version = '3.2.3'
    s.summary = 'Autogenerated spec'
    s.license = 'Unknown'
    s.homepage = 'https://example.com'
    s.authors = { 'Capacitor Generator' => 'hi@example.com' }
    s.source = { :git => 'https://github.com/ionic-team/does-not-exist.git', :tag => '3.2.3' }
    s.source_files = 'sourcesstatic/**/*.{swift,h,m,c,cc,mm,cpp}'
    s.ios.deployment_target  = '12.0'
    s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1 WK_WEB_VIEW_ONLY=1' }
    s.dependency 'CapacitorCordova'
    s.swift_version  = '5.1'
    s.static_framework = true
    s.dependency 'FBSDKCoreKit', '11.1.0'
    s.dependency 'FBSDKLoginKit', '11.1.0'
    s.dependency 'FBSDKShareKit', '11.1.0'
    s.dependency 'GoogleSignIn', '~> 5.0.2'
    s.dependency 'GoogleUtilities', '~> 7.2.2'
    s.dependency 'OneSignal', '2.16.5'
    s.weak_frameworks = 'AddressBook', 'CoreText', 'SafariServices', 'Security', 'SystemConfiguration'
    s.frameworks = 'SystemConfiguration'
    s.libraries = 'z'
  end

CapacitorCommunityFacebookLogin.podspec

require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
  s.name = 'CapacitorCommunityFacebookLogin'
  s.version = package['version']
  s.summary = package['description']
  s.license = package['license']
  s.homepage = package['repository']['url']
  s.author = package['author']
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
  s.ios.deployment_target  = '12.0'
  s.swift_version = '5.1'
  s.static_framework = true
  s.dependency 'Capacitor'
  s.dependency 'FBSDKCoreKit', '~> 11.0.0'
  s.dependency 'FBSDKLoginKit', '~> 11.0.0'
end

The specs in capacitor-cordova-plugin doesnt match the ones in capacitor-comunity/facebook. I could not find a way of downgrading capacitor-cordova-plugin-ios and also there is no update for the facebook-login. If i manually change the version inside capacitor libs its works, however its will be lost every time i run npm. Is there any permanet solution to this problem?

Ionic:

Ionic CLI : 6.18.1 (/Users/fabricadesoftware/.npm-global/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.8.0 @angular-devkit/build-angular : 0.1101.4 @angular-devkit/schematics : 11.1.4 @angular/cli : 11.1.4 @ionic/angular-toolkit : 4.0.0

Capacitor:

Capacitor CLI : 3.2.3 @capacitor/android : 3.2.3 @capacitor/core : 3.3.2 @capacitor/ios : 3.3.2

Cordova:

Cordova CLI : 10.0.0 Cordova Platforms : none Cordova Plugins : no whitelisted plugins (1 plugins total)

Utility:

cordova-res : not installed globally native-run (update available: 1.5.0) : 1.4.1

System:

NodeJS : v16.13.0 (/usr/local/bin/node) npm : 8.1.0 OS : macOS Monterey Xcode : Xcode 13.1 Build version 13A1030d

igorxaviers commented 2 years ago

I'm having the same problem, waiting for an answer.

sunitha1210 commented 2 years ago

I am also facing same issue. any update on this.

rdlabo commented 2 years ago

You may use M1 Mac. So this is not plugin issue.

Please use arch -x86_64 . Thanks.

rgustavsson commented 2 years ago

@rdlabo how is the dependency issue related to M1?

He is obviously using this plugin together with a cordova plugin that depends on a lower version of FBSDKCoreKit ?

sync667 commented 2 years ago

Besides i do not have M1 and got same thing.

[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
  In Podfile:
    CapacitorCommunityFacebookLogin (from `../../node_modules/@capacitor-community/facebook-login`) was resolved to 3.4.0, which depends on
      FBSDKCoreKit (~> 12.0.0)

    CordovaPluginsStatic (from `../capacitor-cordova-ios-plugins`) was resolved to 3.6.0, which depends on
      FBSDKCoreKit (= 11.1.0)

Using older version is impossible too. Because 3.1.1 use FBSD 11.0.0 not 11.1.0

Some digging and problem is only when you have added FB SDK from ionic awesome plugins to support events for ads for example.

sebafra commented 2 years ago

Besides i do not have M1 and got same thing.

[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
  In Podfile:
    CapacitorCommunityFacebookLogin (from `../../node_modules/@capacitor-community/facebook-login`) was resolved to 3.4.0, which depends on
      FBSDKCoreKit (~> 12.0.0)

    CordovaPluginsStatic (from `../capacitor-cordova-ios-plugins`) was resolved to 3.6.0, which depends on
      FBSDKCoreKit (= 11.1.0)

Using older version is impossible too. Because 3.1.1 use FBSD 11.0.0 not 11.1.0

Some digging and problem is only when you have added FB SDK from ionic awesome plugins to support events for ads for example.

I´ve the same problem. Any news about it?

chrisvor commented 2 years ago

Just finished migrating from Ionic 5 to 6 and from Capacitor 2 to 4 (via all the steps needed for 2 -> 3). Ionic serve works without any issue whatsoever (minus the fact that cordova stuff do not work on the web). Tried to build for iOS (did all the necessary npx cap copy / sync etc), but get the same as the other posters, and maybe some more. npx cap sync produces the below:

[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit": In Podfile: CordovaPluginsStatic (from../capacitor-cordova-ios-plugins`) was resolved to 4.0.1, which depends on FBSDKCoreKit (= 8.2.0)

    FBSDKCoreKit

    CocoaPods could not find compatible versions for pod "FBSDKLoginKit":
    In Podfile:
    CordovaPluginsStatic (from `../capacitor-cordova-ios-plugins`) was resolved to [4.0.1](http://4.0.0.1/), which depends on
    FBSDKLoginKit (= [8.2.0)](http://8.2.0%29/)

    FBSDKLoginKit

    CocoaPods could not find compatible versions for pod "Firebase/Auth":
    In Podfile:
    CapacitorFirebaseAuthentication (from `../../node_modules/@capacitor-firebase/authentication`) was resolved to
    [1.0.0](http://1.0.0.0/), which depends on
    Firebase/Auth (= [9.1.0)](http://9.1.0%29/)

    Firebase/Auth

    CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
    In Podfile:
    CapacitorCommunityFirebaseAnalytics (from `../../node_modules/@capacitor-community/firebase-analytics`) was
    resolved to [1.0.1](http://1.0.0.1/), which depends on
    Firebase/Analytics (~> [8.0)](http://8.0%29/) was resolved to [8.0.0](http://8.0.0.0/), which depends on
    Firebase/Core (= [8.0.0)](http://8.0.0%29/) was resolved to [8.0.0](http://8.0.0.0/), which depends on
    Firebase/CoreOnly (= [8.0.0)](http://8.0.0%29/)

    CapacitorFirebaseAuthentication (from `../../node_modules/@capacitor-firebase/authentication`) was resolved to
    [1.0.0](http://1.0.0.0/), which depends on
    Firebase/Auth (= [9.1.0)](http://9.1.0%29/) was resolved to [9.1.0](http://9.1.0.0/), which depends on
    Firebase/CoreOnly (= [9.1.0)](http://9.1.0%29/)`

Any idea how to fix this? This is an already published app, ready to update with new features and had the brilliant idea to make the upgrade now while I'm at it......

Many thanks

adelabd commented 1 year ago

In my case, it was only because I had cordova-plugin-fbsdk in package.json. After removed it, it works well.

zorahrel commented 9 months ago

solved removing @capacitor-community/facebook-login and facebook-login 😄