Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GeoFire on iOS with Firebase 5

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!

like image 842
Georg Avatar asked Oct 28 '25 12:10

Georg


1 Answers

Until this is fixed in the repository you can use this workaround:

  1. Clone the repository locally
  2. Edit your podfile and point to the local repository like this

    pod 'GeoFire', :path => '/Users/hans/repos/geofire-objc'

  3. In "GeoFire.podspec" in the local repository edit the dependency like this

    s.ios.dependency 'Firebase/Database', '~> 5.0'

  4. Add this line to "GeoFire.podspec":

    s.static_framework = true

  5. Run

    pod update

like image 71
Georg Avatar answered Oct 31 '25 02:10

Georg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!