robingenz / capacitor-firebase-authentication-demo

⚡️ Simple Ionic Angular app to demonstrate the use of the Capacitor Firebase Authentication plugin.
MIT License
26 stars 12 forks source link

bug: Podfile : There are multiple dependencies with different sources #225

Closed julienkermarec closed 1 year ago

julienkermarec commented 1 year ago

Describe the bug On the iOS build, at the podfile install, the build fail with an error of 'multiple dependencies with different sources'.

CapacitorFirebaseAuthentication is present on the _def capacitorpods list, but already on the target app with CapacitorFirebaseAuthentication/Facebook + CapacitorFirebaseAuthentication/Google

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/robingenz/capacitor-firebase-authentication-demo repo
  2. pnpm install
  3. ionic build
  4. npx cap sync ios

Expected behavior iOS build has no error

Screenshots Capture d’écran 2023-10-25 à 22 17 55

Desktop (please complete the following information):

Ionic:

   Ionic CLI                     : 6.20.8 (/Users/julienkermarec/.nvm/versions/node/v18.14.0/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.2.1
   @angular-devkit/build-angular : 14.1.1
   @angular-devkit/schematics    : not installed
   @angular/cli                  : 14.1.1
   @ionic/angular-toolkit        : 7.0.0

Capacitor:

   Capacitor CLI      : 5.0.0
   @capacitor/android : 5.0.0
   @capacitor/core    : 5.0.0
   @capacitor/ios     : 5.0.0

Utility:

   cordova-res                          : 0.15.4
   native-run (update available: 1.7.4) : 0.3.0

System:

   NodeJS : v18.14.0 (/Users/julienkermarec/.nvm/versions/node/v18.14.0/bin/node)
   npm    : 9.3.1
   OS     : macOS
   Xcode : 15.0.1

Additional context

require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'

platform :ios, '13.0'
use_frameworks!

install! 'cocoapods', :disable_input_output_paths => true

def capacitor_pods
  pod 'Capacitor', :path => '../../node_modules/.pnpm/@capacitor+ios@5.0.0_@capacitor+core@5.0.0/node_modules/@capacitor/ios'
  pod 'CapacitorCordova', :path => '../../node_modules/.pnpm/@capacitor+ios@5.0.0_@capacitor+core@5.0.0/node_modules/@capacitor/ios'
  pod 'CapacitorFirebaseAuthentication', :path => '../../node_modules/.pnpm/@capacitor-firebase+authentication@5.1.0_mehzrf7cuo37n24skfzwzyfrom/node_modules/@capacitor-firebase/authentication'
  pod 'CapacitorApp', :path => '../../node_modules/.pnpm/@capacitor+app@5.0.0_@capacitor+core@5.0.0/node_modules/@capacitor/app'
  pod 'CapacitorHaptics', :path => '../../node_modules/.pnpm/@capacitor+haptics@5.0.0_@capacitor+core@5.0.0/node_modules/@capacitor/haptics'
  pod 'CapacitorKeyboard', :path => '../../node_modules/.pnpm/@capacitor+keyboard@5.0.0_@capacitor+core@5.0.0/node_modules/@capacitor/keyboard'
end

target 'App' do
  capacitor_pods
  # Add your Pods here
  pod 'CapacitorFirebaseAuthentication/Facebook', :path => '../../node_modules/@capacitor-firebase/authentication'
  pod 'CapacitorFirebaseAuthentication/Google', :path => '../../node_modules/@capacitor-firebase/authentication'
end

# Source: https://www.jessesquires.com/blog/2020/07/20/xcode-12-drops-support-for-ios-8-fix-for-cocoapods/
post_install do |installer|
  assertDeploymentTarget(installer)
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
      target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      end
    end
  end
end
robingenz commented 1 year ago

This is an issue with pnpm. I close this as duplicate of https://github.com/capawesome-team/capacitor-firebase/discussions/308. Here you can find a workaround: https://github.com/capawesome-team/capacitor-firebase/discussions/308#discussioncomment-5380508