mrdishant / flutter_geofire

A Flutter plugin to get the realtime updates of places nearby usinf Firebase GeoFire.
MIT License
23 stars 27 forks source link

Problem using Geofire 2.0.0 on iOS #23

Closed danielmintz closed 3 years ago

danielmintz commented 3 years ago

Hi there,

When testing on iOS emulator.. I am getting this error message when running pod install on Geofire 2.0.0

[!] CocoaPods could not find compatible versions for pod "Firebase/Database": In snapshot (Podfile.lock): Firebase/Database (= 7.11.0) In Podfile: firebase_database (from .symlinks/plugins/firebase_database/ios) was resolved to 6.1.2, which depends on Firebase/Database (= 7.11.0) flutter_geofire (from .symlinks/plugins/flutter_geofire/ios) was resolved to 0.0.1, which depends on GeoFire (~> 4.0) was resolved to 4.1.0, which depends on Firebase/Database (~> 6.0) You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • changed the constraints of dependency Firebase/Database inside your development pod flutter_geofire. You should run pod update Firebase/Database to apply changes you've made.

Hopefully, the error message helps. Let me know if you want more information. I am using these packages: firebase_core: ^1.0.2 firebase_auth: ^1.0.1 firebase_database: ^6.1.1 flutter_geofire: ^2.0.0

On better news.. The Geofire 2.0.0 seems to work fine on Android emulators.

heinzan commented 3 years ago

Same me too

mrdishant commented 3 years ago

Try this Geofire Fix

danielwond commented 3 years ago

It says this:

[!] CocoaPods could not find compatible versions for pod "GeoFire": In Podfile: GeoFire (from https://github.com/mrdishant/geofire-objc, tag 4.3.0)

    flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1, which depends on
      GeoFire (~> 4.1.0)
mrdishant commented 3 years ago

It says this:

[!] CocoaPods could not find compatible versions for pod "GeoFire": In Podfile: GeoFire (from https://github.com/mrdishant/geofire-objc, tag 4.3.0)

    flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1, which depends on
      GeoFire (~> 4.1.0)

can you try after deleting the pods folder and podfile.lock under the ios folder?

danielwond commented 3 years ago

just did, its still the same

mrdishant commented 3 years ago

Can you share the pod file and the error log?

danielwond commented 3 years ago

Uncomment this line to define a global platform for your project

platform :ios, '10.0' use_frameworks!

CocoaPods analytics sends network stats synchronously affecting flutter build latency.

ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', { 'Debug' => :debug, 'Profile' => :release, 'Release' => :release, }

def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), FILE) unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end

File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches end raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do use_frameworks! use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(FILE)) end

post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end

pod 'GeoFire', :git => 'https://github.com/mrdishant/geofire-objc', :tag => '4.3.0'

This is the Pod

danielwond commented 3 years ago

Running pod install... CocoaPods' output: ↳ Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using ARCHS setting to build architectures of target Pods-Runner: (``)

Fetching external sources
-> Fetching podspec for Flutter from Flutter
-> Pre-downloading: GeoFire from https://github.com/mrdishant/geofire-objc, tag 4.3.0
  > Copying GeoFire from /Users/danny/Library/Caches/CocoaPods/Pods/External/GeoFire/08f45aef825a7401d0d0149c88ced7af to Pods/GeoFire
-> Fetching podspec for assets_audio_player from .symlinks/plugins/assets_audio_player/ios
-> Fetching podspec for assets_audio_player_web from .symlinks/plugins/assets_audio_player_web/ios
-> Fetching podspec for firebase_auth from .symlinks/plugins/firebase_auth/ios
firebase_auth: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
-> Fetching podspec for firebase_core from .symlinks/plugins/firebase_core/ios
firebase_core: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
-> Fetching podspec for firebase_database from .symlinks/plugins/firebase_database/ios
firebase_database: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
-> Fetching podspec for firebase_messaging from .symlinks/plugins/firebase_messaging/ios
firebase_messaging: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
-> Fetching podspec for flutter_geofire from .symlinks/plugins/flutter_geofire/ios
-> Fetching podspec for flutter_local_notifications from .symlinks/plugins/flutter_local_notifications/ios
-> Fetching podspec for fluttertoast from .symlinks/plugins/fluttertoast/ios
-> Fetching podspec for geolocator from .symlinks/plugins/geolocator/ios
-> Fetching podspec for google_maps_flutter from .symlinks/plugins/google_maps_flutter/ios
-> Fetching podspec for libphonenumber from .symlinks/plugins/libphonenumber/ios
-> Fetching podspec for libphonenumber_plugin from .symlinks/plugins/libphonenumber_plugin/ios
-> Fetching podspec for path_provider from .symlinks/plugins/path_provider/ios
-> Fetching podspec for url_launcher from .symlinks/plugins/url_launcher/ios

Resolving dependencies of Podfile
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/0/3/5/Firebase/7.11.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/0/3/5/Firebase/7.11.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/0/3/5/Firebase/7.11.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: all_pods_versions_a_d_d.txt exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/a/d/d/GoogleMaps/4.2.0/GoogleMaps.podspec.json exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: all_pods_versions_6_d_6.txt exists! Returning local because checking is only perfomed in repo update
  CDN: trunk Relative path: Specs/6/d/6/libPhoneNumber-iOS/0.9.15/libPhoneNumber-iOS.podspec.json exists! Returning local because checking is only perfomed in repo update
[!] CocoaPods could not find compatible versions for pod "GeoFire":
  In Podfile:
    GeoFire (from https://github.com/mrdishant/geofire-objc, tag `4.3.0`)

    flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1, which depends on GeoFire (~> 4.1.0)

Specs satisfying the GeoFire (from `https://github.com/mrdishant/geofire-objc, tag 4.3.0`), GeoFire (~> 4.1.0) dependency were found, but they required a higher minimum deployment target.

/usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
<internal:kernel>:90:in `tap'
/usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/resolver.rb:94:in `resolve'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/usr/local/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Users/danny/.gem/ruby/3.0.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/Users/danny/.gem/ruby/3.0.0/bin/pod:23:in `load'
/Users/danny/.gem/ruby/3.0.0/bin/pod:23:in `<main>'

Exception: Error running pod install

This is the error

danielwond commented 3 years ago

ive managed to get it working changing the version inside the .symlinks -> plugins -> flutter_geofire-> ios -> flutter_geofire.podspec file. changed the

s.ios.dependency 'Geofire', '~> 4.1.0' to s.ios.dependency 'Geofire', '~> 4.3.0'

heinzan commented 3 years ago

ive managed to get it working changing the version inside the .symlinks -> plugins -> flutter_geofire-> ios -> flutter_geofire.podspec file. changed the

s.ios.dependency 'Geofire', '~> 4.1.0' to s.ios.dependency 'Geofire', '~> 4.3.0'

I got this error how solove

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
[!] CocoaPods could not find compatible versions for pod "GeoFire":
  In Podfile:
    GeoFire (from `https://github.com/mrdishant/geofire-objc`, tag `4.3.0`)

Specs satisfying the `GeoFire (from `https://github.com/mrdishant/geofire-objc`, tag `4.3.0`)` dependency were found, but they required a higher minimum deployment target.
danielwond commented 3 years ago

run flutter clean then delete pod folder in ios, run flutter run from the terminal then change the version inside the flutter_geofire.podspec file then try running it again if that doesnt work, try running pod update or pod repo update

heinzan commented 3 years ago

pod repo update

this is my podfile

Uncomment this line to define a global platform for your project

platform :ios, '10.0'

CocoaPods analytics sends network stats synchronously affecting flutter build latency.

ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', { 'Debug' => :debug, 'Profile' => :release, 'Release' => :release, }

def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), FILE) unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" end

File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches end raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do use_frameworks! use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(FILE)) pod 'GeoFire', :git => 'https://github.com/mrdishant/geofire-objc', :tag => '4.3.0'

end

post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end

I changed flutter_geofire.podspec s.dependency 'Flutter' s.ios.dependency 'GeoFire', '~> 4.3.0'

but cann't solve

danielwond commented 3 years ago

change minimum deployment target to 11.0 in the podfile in the top

heinzan commented 3 years ago

@danielwond @mrdishant Error happening again when i copy new project from old project. This is error message.

   [!] CocoaPods could not find compatible versions for pod "Firebase/Database":
      In Podfile:
        GeoFire (from `https://github.com/mrdishant/geofire-objc`, tag `4.3.0`) was resolved to 4.3.0, which depends on
          GeoFire/Database (= 4.3.0) was resolved to 4.3.0, which depends on
        Firebase/Database (~> 7.11.0)

firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 6.1.2, which depends on
  Firebase/Database (= 8.0.0)
danielwond commented 3 years ago

@danielwond @mrdishant Error happening again when i copy new project from old project. This is error message.

   [!] CocoaPods could not find compatible versions for pod "Firebase/Database":
      In Podfile:
        GeoFire (from `https://github.com/mrdishant/geofire-objc`, tag `4.3.0`) was resolved to 4.3.0, which depends on
          GeoFire/Database (= 4.3.0) was resolved to 4.3.0, which depends on
        Firebase/Database (~> 7.11.0)

firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 6.1.2, which depends on
  Firebase/Database (= 8.0.0)

Post your podfile

heinzan commented 3 years ago

I created my own git and change database version 8.0.0 so ok.Thanks.

danielmintz commented 3 years ago

I have the problem back again with the same error message. Can we reopen this one or I can post a new issue. I don’t know how to do what heinzan did ta

heinzan commented 3 years ago

I have the problem back again with the same error message. Can we reopen this one or I can post a new issue. I don’t know how to do what heinzan did ta

add in your podfile

pod 'GeoFire', :git => 'https://github.com/heinzan/geofire-objc'

I changed database version. like this Null Safety Upgrade - Flutter 2.0 #21