arcore-ios-sdk icon indicating copy to clipboard operation
arcore-ios-sdk copied to clipboard

ARCore in nanopb Dependency Conflict with Firebase & Flutter

Open vilorel opened this issue 1 year ago • 8 comments

Hi all, we've built our AR module that relies on ARCore. We're also using the Firebase Flutter packages and just tried to update them to the latest version.

The error we got is the following (when using Cocapods to build the dependency graph for iOS):

[!] CocoaPods could not find compatible versions for pod "nanopb": In Podfile: ar_flutter_plugin (from .symlinks/plugins/ar_flutter_plugin/ios`) was resolved to 0.6.2, which depends on ARCore/CloudAnchors (~> 1.45.0) was resolved to 1.45.0, which depends on nanopb (< 2.30911.0, >= 2.30908.0)

firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) was resolved to 15.1.0, which depends on
  Firebase/Messaging (= 11.0.0) was resolved to 11.0.0, which depends on
    FirebaseMessaging (~> 11.0.0) was resolved to 11.0.0, which depends on
      nanopb (~> 3.30910.0)`

I understand that nanopb has breaking changes but when do you plan to launch support for the latest version? Otherwise I assume it's a big problem for Flutter users, potentially iOS too?

vilorel avatar Sep 05 '24 17:09 vilorel

I have the same issue any solution for this?

naved997 avatar Sep 07 '24 06:09 naved997

Have you solution for this?

naved997 avatar Sep 07 '24 07:09 naved997

I rolled back all the upgrades for now and downgraded the firebase packages. Anything sort of Google supporting the new nanopb library would be a risky patch.

vilorel avatar Sep 19 '24 13:09 vilorel

Hi everyone!

I have temporarily created a fork of ARCore called ARCoreNanoPbUpdated 1.46.0.1 to address the issue while we await an official update from Google for the ARCore package. To integrate this fix, simply replace the following line in your Podspec: s.dependency 'ARCore/CloudAnchors', '~> 1.46.0' with : s.dependency 'ARCoreNanoPbUpdated/CloudAnchors', '~> 1.46.0.2'

I hope this helps!

hlefe avatar Nov 08 '24 16:11 hlefe

Hey @hlefe, thanks a lot for the fix!

However, when I try to install 'ARCoreNanoPbUpdated/Geospatial', I cannot import ARCore anymore.

Do you happen to know how to resolve it?

UmidjonOkhunov avatar Nov 26 '24 05:11 UmidjonOkhunov

Could you try replacing import ARCore with import ARCoreBase and let me know if it works? (Still installing 'ARCoreNanoPbUpdated/Geospatial', '~> 1.46.0.2' )

hlefe avatar Nov 27 '24 20:11 hlefe

Thanks @hlefe but I couldn't make it work. Would you be able to share the podspec file you used to create the cocoapods library? I wasn't able to find one myself. thanks!

UmidjonOkhunov avatar Dec 04 '24 03:12 UmidjonOkhunov

I just added it : https://github.com/hlefe/ARCoreNanoPbUpdated/blob/main/ARCoreNanoPbUpdated.podspec

hlefe avatar Dec 09 '24 15:12 hlefe