The update from Firebase 4.x to Firebase 5.0.0 broke my GeoFire installation. I was installing GeoFire via "Podfile" like this:
pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git'
I now receive this error message:
[!] CocoaPods could not find compatible versions for pod "Firebase/Database": In Podfile: Firebase/Database
GeoFire (from
https://github.com/firebase/geofire-objc.git
) was resolved to 2.0.1, which depends on Firebase/Database (~> 4.0) Specs satisfying the Firebase/Database, Firebase/Database (~> 4.0) dependency were found, but they required a higher minimum deployment target.
The deployment target in Podfile as well as in the Xcode project is iOS 11. So there really is no higher minimum deployment target.
Cloning the repo locally and changing the installation to
pod 'GeoFire', :path => '/Users/georg/Projekte/Repos/geofire-objc'
and raising the dependency to Firebase 5.0 does not seem to work either as I now receive the error message
[!] The 'Pods-poifinder' target has transitive dependencies that include static frameworks: (FirebaseDatabase, FirebaseCore, FirebaseAuth, FirebaseFirestore, FirebaseFunctions, and FirebaseStorage)
Firebase has switched to source pods with v5.0.0 which might be an explanation for this.
My question is now: How do I get GeoFire to work with Firebase 5.0 in a Swift 4.1 project. Thanks!
Until this is fixed in the repository you can use this workaround:
Edit your podfile and point to the local repository like this
pod 'GeoFire', :path => '/Users/hans/repos/geofire-objc'
In "GeoFire.podspec" in the local repository edit the dependency like this
s.ios.dependency 'Firebase/Database', '~> 5.0'
Add this line to "GeoFire.podspec":
s.static_framework = true
Run
pod update