Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: dependencies issue with version of GoogleUtilities/UserDefaults between MLKitBarcodeScanning and FirebaseInstallations during pod install on iOS #212

Closed
5 of 11 tasks
MillieOfzo opened this issue Nov 28, 2024 · 7 comments
Labels

Comments

@MillieOfzo
Copy link

MillieOfzo commented Nov 28, 2024

Plugin(s)

  • Barcode Scanning
  • Face Detection
  • Face Mesh Detection
  • Selfie Segmentation
  • Translation

Version

6.2.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

On ios when running pod install --repo-update we observe the following error:

    asb@asbs-Mac-mini app % pod install --repo-update
    Updating local specs repositories
    Analyzing dependencies
    [!] CocoaPods could not find compatible versions for pod "GoogleUtilities/UserDefaults":
       In Podfile:
    CapacitorFirebaseAnalytics/Analytics (from `../../../../node_modules/@capacitor-firebase/analytics`) was resolved to 6.2.0, which depends on
      FirebaseAnalytics (~> 11.0) was resolved to 11.5.0, which depends on
        FirebaseInstallations (~> 11.0) was resolved to 11.5.0, which depends on
          GoogleUtilities/UserDefaults (~> 8.0)

    CapacitorMlkitBarcodeScanning (from `../../../../node_modules/@capacitor-mlkit/barcode-scanning`) was resolved to 6.2.0, which depends on
      GoogleMLKit/BarcodeScanning (= 5.0.0) was resolved to 5.0.0, which depends on
        MLKitBarcodeScanning (~> 4.0.0) was resolved to 4.0.0, which depends on
          MLKitCommon (~> 10.0) was resolved to 10.0.0, which depends on
            GoogleUtilities/UserDefaults (~> 7.0)

Expected behavior

.

Reproduction

.

Steps to reproduce

latest XCODE

Other information

require_relative '../../../../node_modules/@capacitor/ios/scripts/pods_helpers'
platform :ios, '14.0'
use_frameworks!

# workaround to avoid Xcode caching of Pods that requires
# Product -> Clean Build Folder after new Cordova plugins installed
# Requires CocoaPods 1.6 or newer
install! 'cocoapods', :disable_input_output_paths => true

def capacitor_pods
  pod 'Capacitor', :path => '../../../../node_modules/@capacitor/ios'
  pod 'CapacitorCordova', :path => '../../../../node_modules/@capacitor/ios'
  pod 'CapacitorMlkitBarcodeScanning', :path => '../../../../node_modules/@capacitor-mlkit/barcode-scanning'
  pod 'CapacitorFirebaseAnalytics', :path => '../../../../node_modules/@capacitor-firebase/analytics'
  pod 'CapacitorCommunityNativeMarket', :path => '../../../../node_modules/@capacitor-community/native-market'
  pod 'CapacitorCommunityPrivacyScreen', :path => '../../../../node_modules/@capacitor-community/privacy-screen'
  pod 'CapacitorApp', :path => '../../../../node_modules/@capacitor/app'
  pod 'CapacitorBrowser', :path => '../../../../node_modules/@capacitor/browser'
  pod 'CapacitorCamera', :path => '../../../../node_modules/@capacitor/camera'
  pod 'CapacitorClipboard', :path => '../../../../node_modules/@capacitor/clipboard'
  pod 'CapacitorDevice', :path => '../../../../node_modules/@capacitor/device'
  pod 'CapacitorFilesystem', :path => '../../../../node_modules/@capacitor/filesystem'
  pod 'CapacitorGeolocation', :path => '../../../../node_modules/@capacitor/geolocation'
  pod 'CapacitorHaptics', :path => '../../../../node_modules/@capacitor/haptics'
  pod 'CapacitorKeyboard', :path => '../../../../node_modules/@capacitor/keyboard'
  pod 'CapacitorLocalNotifications', :path => '../../../../node_modules/@capacitor/local-notifications'
  pod 'CapacitorNetwork', :path => '../../../../node_modules/@capacitor/network'
  pod 'CapacitorPreferences', :path => '../../../../node_modules/@capacitor/preferences'
  pod 'CapacitorPushNotifications', :path => '../../../../node_modules/@capacitor/push-notifications'
  pod 'CapacitorSplashScreen', :path => '../../../../node_modules/@capacitor/splash-screen'
  pod 'CapacitorStatusBar', :path => '../../../../node_modules/@capacitor/status-bar'
  pod 'CapacitorToast', :path => '../../../../node_modules/@capacitor/toast'
  pod 'CapacitorNativeBiometric', :path => '../../../../node_modules/capacitor-native-biometric'
  pod 'CapacitorNativeSettings', :path => '../../../../node_modules/capacitor-native-settings'
end

target 'App' do
  capacitor_pods
  # Add your Pods here
  pod 'FirebaseMessaging'
  pod 'CapacitorFirebaseAnalytics/Analytics', :path => '../../../../node_modules/@capacitor-firebase/analytics'
end
post_install do |installer|
  assertDeploymentTarget(installer)
  
  installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        	# Build for all architectures
          config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
          # Exclude arm64 architecture for the iOS simulator
          config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'

          config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
          config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
          config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
      end
  end
end

Capacitor doctor

.

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
@MillieOfzo MillieOfzo added bug/fix Something isn't working needs: triage labels Nov 28, 2024
@MillieOfzo MillieOfzo changed the title bug: bug: dependencies issue with version of GoogleUtilities/UserDefaults between MLKitBarcodeScanning and FirebaseInstallations during pod install on iOS Nov 28, 2024
@robingenz
Copy link
Member

Please install the latest version of both (ML Kit Barcode Scanning and Firebase Analytics) plugins and try again.

@MillieOfzo
Copy link
Author

MillieOfzo commented Nov 28, 2024

Please install the latest version of both (ML Kit Barcode Scanning and Firebase Analytics) plugins and try again.

My bad. I forgot to include the package.json. We have all latest versions installed:

.......
    "@capacitor-community/native-market": "^6.0.0",
    "@capacitor-community/privacy-screen": "^5.0.0",
    "@capacitor-firebase/analytics": "^6.2.0",
    "@capacitor-mlkit/barcode-scanning": "^6.2.0",
......

@robingenz
Copy link
Member

Please use the next tag for @capacitor-mlkit/barcode-scanning:

npm install @capacitor-mlkit/barcode-scanning@next

Make sure to also update the Minimum Deployment Target.

@MillieOfzo
Copy link
Author

Please use the next tag for @capacitor-mlkit/barcode-scanning:

npm install @capacitor-mlkit/barcode-scanning@next

Make sure to also update the Minimum Deployment Target.

Success! The above solved the issues!

@vochitan90
Copy link

vochitan90 commented Dec 13, 2024

Hi @MillieOfzo I do the same 2 steps

but I still facing the same problem, please take a look again, thank you!
image

image

@robingenz
Copy link
Member

@vochitan90 Delete the Podfile.lock and try it again.

@vochitan90
Copy link

hi @robingenz you saved my day!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants