Skip to content

Incompatibility with Firebase #29

@nuagoz

Description

@nuagoz

Hello,

I have a Firebase dependency conflict when building on iOS. In my app, I have Firebase installed with

"@react-native-firebase/app": "^21.11.0".

We can't use react-native-vision-camera-text-recognition alongside Firebase packages. This prevents iOS builds from completing due to incompatible version requirements.

> CocoaPods could not find compatible versions for pod "GoogleUtilities/UserDefaults":
>   In Podfile:
>     RNFBAppCheck (from `../node_modules/@react-native-firebase/app-check`) was resolved to 21.11.0, which depends on
>       Firebase/AppCheck (= 11.8.0) was resolved to 11.8.0, which depends on
>         FirebaseAppCheck (~> 11.8.0) was resolved to 11.8.0, which depends on
>           GoogleUtilities/UserDefaults (~> 8.0)
> 
>     VisionCameraTextRecognition (from `../node_modules/react-native-vision-camera-text-recognition`) was resolved to 3.1.1, which depends on
>       GoogleMLKit/TextRecognitionJapanese was resolved to 2.3.0, which depends on
>         MLKitTextRecognitionJapanese (~> 1.0.0-beta1) was resolved to 1.0.0-beta1, which depends on
>           MLKitCommon (~> 3.1) was resolved to 3.1.0, which depends on
>             GoogleUtilities/UserDefaults (~> 7.0)

It seems there are problems with the versions being installed in the podspec. It appears to be installing older versions that use GoogleUtilities 7, while Firebase has been using version 8 for many releases already. When looking at the MLKit documentation, I saw they made compatibility adjustments for iOS: https://developers.google.com/ml-kit/release-notes#september_30_2024

I tried to manually update the versions myself, but it didn't work. It requests building for a higher iOS target version, and I can't successfully build for iOS.

VisionCameraTextRecognition.podspec:

  s.dependency "React-Core"
  s.dependency "VisionCamera"
  s.dependency "GoogleMLKit/TextRecognition", "7.0.0"
  s.dependency "GoogleMLKit/TextRecognitionChinese", "7.0.0"
  s.dependency "GoogleMLKit/TextRecognitionDevanagari", "7.0.0"
  s.dependency "GoogleMLKit/TextRecognitionJapanese", "7.0.0"
  s.dependency "GoogleMLKit/TextRecognitionKorean", "7.0.0"
  s.dependency "GoogleMLKit/Translate", "7.0.0"

Would someone be able to update the MLKit packages on iOS to handle compatibility issues? It's supposed to be possible, and on Android it works perfectly.

Thank you for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions