juliansteenbakker / mobile_scanner

A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.
BSD 3-Clause "New" or "Revised" License
745 stars 444 forks source link

Some dependencies use older versions of GTMSessionFetcher/Core which cause conflicts with other packages #1020

Closed kev-techi closed 1 month ago

kev-techi commented 1 month ago

Through GoogleMLKit/BarcodeScanning there is a dependency on GTMSessionFetcher/Core (< 3.0, >= 1.1).

However, some other packages now use GTMSessionFetcher (>= 3.4.0).

Is it a complex thing to bump this dependency?

For the moment I will downgrade those other packages.

CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
  In Podfile:
    google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
      GTMSessionFetcher (>= 3.4.0) was resolved to 3.4.0, which depends on
        GTMSessionFetcher/Full (= 3.4.0) was resolved to 3.4.0, which depends on
          GTMSessionFetcher/Core (= 3.4.0)

    google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
      GoogleSignIn (~> 7.1) was resolved to 7.1.0, which depends on
        GTMAppAuth (< 5.0, >= 4.1.1) was resolved to 4.1.1, which depends on
          GTMSessionFetcher/Core (< 4.0, >= 3.3)

    google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
      GoogleSignIn (~> 7.1) was resolved to 7.1.0, which depends on
        GTMSessionFetcher/Core (~> 3.3)

    mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 3.5.6, which depends on
      GoogleMLKit/BarcodeScanning (~> 4.0.0) was resolved to 4.0.0, which depends on
        MLKitBarcodeScanning (~> 3.0.0) was resolved to 3.0.0, which depends on
          MLKitCommon (~> 9.0) was resolved to 9.0.0, which depends on
            GTMSessionFetcher/Core (< 3.0, >= 1.1)
kev-techi commented 1 month ago

I see that this will be resolved in the next major release. Closing.

haf commented 2 weeks ago

So the solution here;

  1. Firebase by default locks to v3.3.1 (of GTMSessionFetcher/Core), and MLVisionKit depends on <3.0 >1.x
  2. So if you pod update after instaling this package, it's going to lock in a downgraded GTMSessionFetcher/Core, which seems to work