Skip to content

Conversation

Copy link

Copilot AI commented Sep 27, 2025

This PR resolves critical iOS dependency version conflicts that prevent the card_scanner plugin from being used alongside Firebase and Google Sign-In packages in Flutter applications.

Problem

Users were encountering CocoaPods dependency resolution failures when trying to use card_scanner with other popular Flutter plugins:

CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
- card_scanner depends on GoogleMLKit/TextRecognition → GTMSessionFetcher/Core (~> 1.1)
- firebase_auth depends on GTMSessionFetcher/Core (< 6.0, >= 3.4)
- google_sign_in_ios depends on GTMSessionFetcher/Core (< 4.0, >= 3.3)

CocoaPods could not find compatible versions for pod "GoogleDataTransport":
- card_scanner depends on GoogleMLKit/TextRecognition → GoogleDataTransport (~> 8.0)
- firebase_messaging depends on GoogleDataTransport (~> 10.1)

Solution

Updated the iOS podspec to use modern, compatible dependency versions:

  • GoogleMLKit/TextRecognition: Updated from unversioned to ~> 3.2.0 for compatibility with current Firebase packages
  • iOS deployment target: Updated from 10.0 to 12.0 to match documented requirements and modern iOS standards
  • Simulator architecture support: Improved build configurations for Apple Silicon Macs
  • Removed stale Podfile.lock: Forces fresh dependency resolution

Changes

  • ios/card_scanner.podspec: Updated dependency versions and build configurations
  • pubspec.yaml: Bumped version to 1.0.3
  • CHANGELOG.md: Documented all changes
  • example/ios/Podfile.lock: Removed to force clean dependency resolution

Testing

The changes maintain full API compatibility with existing iOS Swift code while resolving version conflicts. The updated GoogleMLKit version uses the same TextRecognizer.textRecognizer() API that the plugin's iOS implementation relies on.

Impact

This fix enables developers to use card_scanner alongside Firebase Auth, Firebase Messaging, Google Sign-In, and other popular Flutter plugins without encountering dependency resolution errors during iOS builds.

Closes #[issue_number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Please update package!</issue_title>
<issue_description>In Podfile: card_scanner (from .symlinks/plugins/card_scanner/ios) was resolved to 0.0.1, which depends on GoogleMLKit/TextRecognition was resolved to 0.60.0, which depends on GoogleMLKit/MLKitCore (= 0.60.0) was resolved to 0.60.0, which depends on MLKitCommon (> 0.60.0) was resolved to 0.60.0, which depends on GTMSessionFetcher/Core (> 1.1) firebase_auth (from .symlinks/plugins/firebase_auth/ios) was resolved to 6.0.2, which depends on Firebase/Auth (= 12.2.0) was resolved to 12.2.0, which depends on FirebaseAuth (> 12.2.0) was resolved to 12.2.0, which depends on GTMSessionFetcher/Core (< 6.0, >= 3.4) 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.5.0, which depends on GTMSessionFetcher/Full (= 3.5.0) was resolved to 3.5.0, which depends on GTMSessionFetcher/Core (= 3.5.0) google_sign_in_ios (from .symlinks/plugins/google_sign_in_ios/darwin) was resolved to 0.0.1, which depends on GoogleSignIn (> 8.0) was resolved to 8.0.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 (> 8.0) was resolved to 8.0.0, which depends on GTMSessionFetcher/Core (> 3.3) You have either: * out-of-date source repos which you can update with pod repo update or with pod install --repo-update. * changed the constraints of dependency GTMSessionFetcher/Core inside your development pod card_scanner. You should run pod update GTMSessionFetcher/Core to apply changes you've made. CocoaPods could not find compatible versions for pod "GoogleDataTransport": In snapshot (Podfile.lock): GoogleDataTransport (= 10.1.0, > 10.1) In Podfile: card_scanner (from .symlinks/plugins/card_scanner/ios) was resolved to 0.0.1, which depends on GoogleMLKit/TextRecognition was resolved to 1.0.0, which depends on GoogleMLKit/MLKitCore (= 1.0.0) was resolved to 1.0.0, which depends on MLKitCommon (> 1.0.0) was resolved to 1.0.0, which depends on GoogleDataTransport (> 8.0) firebase_messaging (from .symlinks/plugins/firebase_messaging/ios) was resolved to 16.0.1, which depends on Firebase/Messaging (= 12.2.0) was resolved to 12.2.0, which depends on FirebaseMessaging (> 12.2.0) was resolved to 12.2.0, which depends on GoogleDataTransport (~> 10.1)

</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #83

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits September 27, 2025 03:45
Co-authored-by: nateshmbhat <23279926+nateshmbhat@users.noreply.github.com>
Co-authored-by: nateshmbhat <23279926+nateshmbhat@users.noreply.github.com>
Copilot AI changed the title [WIP] Please update package! Fix iOS dependency version conflicts with Firebase and Google Sign-In packages Sep 27, 2025
Copilot AI requested a review from nateshmbhat September 27, 2025 03:49
Copilot finished work on behalf of nateshmbhat September 27, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please update package!

2 participants