mrdishant / flutter_geofire

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

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies. #22

Open Dahleh opened 3 years ago

Dahleh commented 3 years ago

When ever i run my project i get this error:

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies. To update the CocoaPods specs, run: pod repo update

Error running pod install Error launching application on iPhone 11.

I tried to run 'pod repo update' no luck.

my pubspec.yaml: dependencies: flutter: sdk: flutter

cupertino_icons: ^1.0.2 firebase_core: ^1.0.1 firebase_auth: ^1.0.1 firebase_database: ^6.1.0 connectivity: ^3.0.3 google_maps_flutter: ^2.0.1 outline_material_icons: ^0.1.1 geolocator: ^7.0.1 http: ^0.13.1 provider: ^4.3.3 flutter_polyline_points: ^0.2.4 font_awesome_flutter: ^8.11.0 animated_text_kit: ^3.1.2 flutter_geofire: ^2.0.0 dev_dependencies: flutter_test: sdk: flutter

my podfile:

Uncomment this line to define a global platform for your project

platform :ios, '10.0'

use_frameworks!

use_modular_headers!

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 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

BankySam commented 3 years ago

I am having the same issue . Any luck ?

BankySam commented 3 years ago

Is Geo fire still a valid flutter package? Please who knows any alternative Thanks

developer-farhan commented 3 years ago

getting import <firebase/firebase.h> error when I run on IOS please fix this !

danielwond commented 3 years ago

im having the same problem, the project wont build, then it worked when i removed the dependency, took me a while too figure out GeoFire was the issue...

Please fix it..

heinzan commented 3 years ago

Same error too pleas help.

mrdishant commented 3 years ago

Try this Geofire Fix

developer-farhan commented 3 years ago

Try this Geofire Fix

didn't worked

mrdishant commented 3 years ago

run flutter clean then delete pod folder in ios and the podfile.lock,

Then run flutter run.

Moatsem12347 commented 3 years ago

run flutter clean then delete pod folder in ios and the podfile.lock,

Then run flutter run.

it still have the same issue. not fixed yet. Why its closed issue?

developer-farhan commented 3 years ago

exactly! im still getting errors how is it marked closed? very confused

can anyone test if they get same error. have a simple app even default counter app is fine.import packages

-firebase core -Firebase Auth -firebase storage

link it with firebase and by link I mean put google service firebase files

1) completely close app and build. see if it works properly ( which It will from my experience )

now import package flutter geo fire. and now completely close app and build again. do you get errors too? im using m1 airbook

mrdishant commented 3 years ago

@Moatsem12347 @officialFlutterDeveloper

Can you share the podfile and pubsec.yaml file?

Moatsem12347 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))

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

Moatsem12347 commented 3 years ago

@mrdishant

and these are the used dependencies.

environment: sdk: ">=2.7.0 <3.0.0"

dependencies: flutter: sdk: flutter

The following adds the Cupertino Icons font to your application.

Use with the CupertinoIcons class for iOS style icons.

cupertino_icons: ^1.0.2 firebase_core: ^1.0.3 firebase_auth: ^1.0.2 firebase_database: ^6.1.2 connectivity: ^3.0.3 google_maps_flutter: ^2.0.5 outline_material_icons: ^0.1.1 geolocator: ^7.0.1 http: ^0.13.1 provider: ^5.0.0 flutter_geofire: ^2.0.0

Moatsem12347 commented 3 years ago

@mrdishant the error I got is like this Running pod install... CocoaPods' output: ↳ Preparing

Analyzing dependencies

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

Finding Podfile changes
  A GeoFire
  A flutter_geofire
  - Flutter
  - connectivity
  - firebase_auth
  - firebase_core
  - firebase_database
  - geolocator
  - google_maps_flutter

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/amadouarafat/Library/Caches/CocoaPods/Pods/External/GeoFire/08f45aef825a7401d0d0149c88ced7af` to `Pods/GeoFire`
-> Fetching podspec for `connectivity` from `.symlinks/plugins/connectivity/ios`
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
firebase_auth: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_database` from `.symlinks/plugins/firebase_database/ios`
firebase_database: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
-> Fetching podspec for `flutter_geofire` from `.symlinks/plugins/flutter_geofire/ios`
-> Fetching podspec for `geolocator` from `.symlinks/plugins/geolocator/ios`
-> Fetching podspec for `google_maps_flutter` from `.symlinks/plugins/google_maps_flutter/ios`

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.

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

Exception: Error running pod install

developer-farhan commented 3 years ago

Failed to build iOS app Error output from Xcode build: ↳ objc[15163]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x2011b8188) and ?? (0x115c482b8). One of the two will be used. Which one is undefined. objc[15163]: Class AMSupportURLSession is implemented in both ?? (0x2011b81d8) and ?? (0x115c48308). One of the two will be used. Which one is undefined. 2021-05-23 21:19:49.291 xcodebuild[15163:9370306] warning: The file reference for "Firebase.debug.xcconfig" is a member of multiple groups ("Support Files" and "Support Files"); this indicates a malformed project. Only the membership in one of the groups will be preserved (but membership in targets will be unaffected). If you want a reference to the same file in more than one group, please add another reference to the same path. 2021-05-23 21:19:49.291 xcodebuild[15163:9370306] warning: The file reference for "Firebase.release.xcconfig" is a member of multiple groups ("Support Files" and "Support Files"); this indicates a malformed project. Only the membership in one of the groups will be preserved (but membership in targets will be unaffected). If you want a reference to the same file in more than one group, please add another reference to the same path. BUILD FAILED

Xcode's output: ↳ In file included from /Users/farhanlatif/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.2.0/ios/Classes/FLTFirebasePluginRegistry.m:5: In file included from /Users/farhanlatif/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.2.0/ios/Classes/FLTFirebasePluginRegistry.h:6: /Users/farhanlatif/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.2.0/ios/Classes/FLTFirebasePlugin.h:15:9: fatal error: 'Flutter/Flutter.h' file not found

import <Flutter/Flutter.h>

        ^~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
warning: Stale file '/Users/farhanlatif/AndroidStudioProjects/UBER ATTEMPT 2/car_delivery_udemy/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/geolocator.framework' is located outside of the allowed root paths.

Could not build the application for the simulator. Error launching application on iPhone 12.

developer-farhan commented 3 years ago

I dislike seeing that fatal error: Flutter/Flutter.h so so much. someone please find a solution

developer-farhan commented 3 years ago

cupertino_icons: ^1.0.2 firebase_core: ^1.2.0 firebase_auth: ^1.2.0 firebase_database: ^6.1.2

google_maps_flutter: ^2.0.5

geolocator: ^7.0.3

http: ^0.13.3

provider: ^4.3.2+2

flutter_polyline_points: ^0.2.4

flutter_geofire: ^1.0.3

url_launcher: ^6.0.4

smooth_star_rating: ^1.1.1 intl: ^0.17.0

my dependencies

danielwond commented 3 years ago

Change your ios version on your podfile from 10.0 to 11.0.. Also flutter_geofire: ^2.0.0

Moatsem12347 commented 3 years ago

@danielwond did that... didn't work!

Moatsem12347 commented 3 years ago

@mrdishant The issue is with Geofire if I comment the dependencie (flutter_geofire: ^2.0.0) it works fine.

developer-farhan commented 3 years ago

even the latest geofier 2.0.0 update doesn't work and if we don't do make it an raising issue we will never get a solution trust me its been almost 2 months of me trying to find a solution

socrates-hlapolosa commented 3 years ago

Also picked up this issue with the geofire on version 2.0.0 and the worst part is that i cant use an older version since it has a dependency on firebase database. Please do help urgently.

heinzan commented 3 years ago

@socrates-hlapolosa @officialFlutterDeveloper @Moatsem12347

This is my podfile

Uncomment this line to define a global platform for your project

platform :ios, '11.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/heinzan/geofire-objc' end

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

This is my yaml file cupertino_icons: ^1.0.0 firebase_core: ^1.1.0 firebase_auth: ^1.1.3 firebase_database: ^6.1.2 google_maps_flutter: ^2.0.3 outline_material_icons: ^0.1.1 geolocator: ^7.0.3 http: ^0.13.3 provider: ^4.3.2+3 flutter_polyline_points: ^0.2.4 font_awesome_flutter: ^9.0.0 animated_text_kit: ^3.1.0 flutter_geofire: 2.0.0 timelines: ^0.0.2+1 modal_bottom_sheet: ^2.0.0 flutter_datetime_picker: ^1.5.0 circular_check_box: ^1.0.4 intl: ^0.17.0 dio: ^4.0.0 fluttertoast: ^8.0.3 flutter_signin_button: ^2.0.0 shared_preferences: ^2.0.5 awesome_dialog: ^1.3.2 expandable: ^5.0.1 uuid: ^3.0.4 flutter_facebook_auth: ^3.3.3+1 rename: ^1.3.1 firebase_analytics: ^8.1.0

Change s.ios.dependency 'GeoFire', '~> 4.3.0' in flutter_geofire.podsec

First clean your project delete pod file and pod.lock.

Moatsem12347 commented 3 years ago

@heinzan I tried again by replacing my files with your files but It still got me the same issue. at this point I'm confused.

heinzan commented 3 years ago

@heinzan I tried again by replacing my files with your files but It still got me the same issue. at this point I'm confused.

I think that is your error [!] 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 (fromhttps://github.com/mrdishant/geofire-objc, tag4.3.0) dependency were found, but they required a higher minimum deployment target. Am i right? See my pod file.

AhmedAbouelkher commented 3 years ago

Hello, I had the same issue conflicting with Firebase_database and I edited the original repo.

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

  #Past here
  pod 'GeoFire', :git => 'https://github.com/AhmedAbouelkher/geofire-objc', :tag => '4.4.0'

end
Moatsem12347 commented 3 years ago

@heinzan your solution worked. thanks man.

someshlaheri commented 3 years ago

Hello, I had the same issue conflicting with Firebase_database and I edited the original repo.

  • Copy pod 'GeoFire', :git => 'https://github.com/AhmedAbouelkher/geofire-objc', :tag => '4.4.0'
  • Past in ios/Podfile
target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

  #Past here
  pod 'GeoFire', :git => 'https://github.com/AhmedAbouelkher/geofire-objc', :tag => '4.4.0'

end
  • Run your app.
  • DONE

Please share how to fix the issue of : The plugin flutter_geofire uses a deprecated version of the Android embedding. To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.

sdkysfzai commented 2 years ago

This doesn't work for me as well. [!] CocoaPods could not find compatible versions for pod "Firebase/Database": In Podfile: GeoFire (fromhttps://github.com/AhmedAbouelkher/geofire-objc, tag4.4.0`) was resolved to 4.4.0, which depends on GeoFire/Database (= 4.4.0) was resolved to 4.4.0, which depends on Firebase/Database (~> 8.0.0)

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

`