Description
1- FirebaseFirestore requires nanopb
2- Upstream, FirebaseCore used to depend on FirebaseCoreDiagnostics, which transitively gave us a dependency on nanopb
3- FirebaseCoreDiagnostics was removed from FirebaseCore dependency chain for v10+ of firebase-ios-sdk meaning we no longer have this "free" transitive dependency
4. "most" other modules also depend directly or transitively on nanopb but not all do:
- Have nanopb: analytics (via GoogleAppMeasurement), app-distribution (via GoogleDataTransport), crashlytics, in-app-messaging, messaging, performance
- Do not have nanopb: all the rest (e.g., app-check, auth, database, dynamic-links, firestore, functions, installations, ml, remote-config, storage)
- Any combination of modules that includes this distribution of FirebaseFirestore without also including one of the other modules that depends on nanopb will result in nanopb not being found and a build failure
Temporary resolution is to add a dependency on nanopb with correct version constraints to consumers of this dependency:
s.dependency 'nanopb', '>= 2.30908.0', '< 2.30910.0'
More complete fix will involve adding something similar to the leveldb dependency here, where we attempt to detect if leveldb exists by examining the other deps to see if one of them is in the list above, or allowing consumer to specify it directly, or...something else if there is a better solution