DarshanGowda0 / GeoFlutterFire

:fire:GeoFlutterFire:fire: is an open-source library that allows you to store and query firestore documents based on their geographic location.
https://youtu.be/MYHVyl-juUk
MIT License
305 stars 261 forks source link

Can't build the project using GeoFlutter Fire #18

Closed felpsio closed 5 years ago

felpsio commented 5 years ago

I just add GeoFlutter Fire to my pubspec and started throwing build erros:

(...)
    [!] Unable to determine Swift version for the following pods:
    - `geoflutterfire` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer/xcode/target_validator.rb:115:in `verify_swift_pods_swift_version'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:459:in `validate_targets'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:138:in `install!'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command/install.rb:48:in `run'
    /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:22:in `load'
    /usr/local/bin/pod:22:in `<main>'
Error output from CocoaPods:
↳
    Ignoring bindex-0.5.0 because its extensions are not built.  Try: gem pristine bindex --version 0.5.0
    Ignoring bootsnap-1.3.0 because its extensions are not built.  Try: gem pristine bootsnap --version 1.3.0
    Ignoring byebug-10.0.2 because its extensions are not built.  Try: gem pristine byebug --version 10.0.2
        WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
        Consider adding the following to ~/.profile:
        export LANG=en_US.UTF-8

    Ignoring duktape-1.6.1.0 because its extensions are not built.  Try: gem pristine duktape --version 1.6.1.0
    Ignoring ffi-1.9.23 because its extensions are not built.  Try: gem pristine ffi --version 1.9.23
    Ignoring json-2.1.0 because its extensions are not built.  Try: gem pristine json --version 2.1.0
    Ignoring msgpack-1.2.4 because its extensions are not built.  Try: gem pristine msgpack --version 1.2.4
    Ignoring nio4r-2.3.1 because its extensions are not built.  Try: gem pristine nio4r --version 2.3.1
    Ignoring nokogiri-1.8.2 because its extensions are not built.  Try: gem pristine nokogiri --version 1.8.2
    Ignoring puma-3.11.4 because its extensions are not built.  Try: gem pristine puma --version 3.11.4
    Ignoring unf_ext-0.0.7.5 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.5
    Ignoring websocket-driver-0.7.0 because its extensions are not built.  Try: gem pristine websocket-driver --version 0.7.0
    [!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone XR.
Exited (sigterm)

flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.2.1, on Mac OS X 10.14.3 18D109, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.1)
[✓] VS Code (version 1.31.1)
[✓] Connected device (1 available)

I tried the versions 2.0.0 - 2.0.3. My pubspec related to firebase/geolocation packages:

firebase_auth: ^0.8.1+1
google_sign_in: ^4.0.1+1
flutter_facebook_login: ^1.2.0
cloud_firestore: ^0.9.0+2 #you have to run cd ios && pod update Firebase/Firestore
firebase_storage: ^2.1.0+1
geolocator: ^3.0.1
geoflutterfire: ^2.0.3
felpsio commented 5 years ago

I cloned the repository and I could make it working changing the geoflutterfire.podspec to:

#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
  s.name             = 'geoflutterfire'
  s.version          = '0.0.1'
  s.summary          = 'A new Flutter plugin.'
  s.swift_version    = '4.2' #I added this line
  s.description      = <<-DESC
A new Flutter plugin.
                       DESC
  s.homepage         = 'http://example.com'
  s.license          = { :file => '../LICENSE' }
  s.author           = { 'Your Company' => 'email@example.com' }
  s.source           = { :path => '.' }
  s.source_files = 'Classes/**/*'
  s.public_header_files = 'Classes/**/*.h'
  s.dependency 'Flutter'

  s.ios.deployment_target = '8.0'
end

Not sure if the 4.2 would be the best version to let on the package. If you think it is I can create a PR

ebastuart commented 5 years ago

Have the same issue, @felipecesar42 can you provide a step by step instruction how did you solve this issue. I have no clue how to clone and use such packages.

Thank in advanced

felpsio commented 5 years ago

hi @ebastuart , use this in your pubspec temporally:

geoflutterfire:
    git: https://github.com/felipecesar42/GeoFlutterFire.git

Probably it will be fixed on the next versions so you should come back to this repository to get the new updates of the package

ebastuart commented 5 years ago

thanks @felipecesar42

but it failed:

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/ebastuart/development/flutter/.pub-cache/git/GeoFlutterFire-b0d885a363d0ff1cab211905c95a0981940b6f7d/ios/Classes/GeoflutterfirePlugin.m:2:9: fatal error: 'geoflutterfire/geoflutterfire-Swift.h' file not found
    #import <geoflutterfire/geoflutterfire-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
felpsio commented 5 years ago

@ebastuart try to put this on your Podfile (ios/Podfile): use_frameworks!

Should look like this:

target 'Runner' do
  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  use_frameworks! #:)
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')
ebastuart commented 5 years ago

got a new error:

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    <unknown>:0: error: underlying Objective-C module 'geoflutterfire' not found
felpsio commented 5 years ago

@ebastuart: I have no idea now. Can you try flutter clean, build and send the full error log + your podfile + flutter doctor + your pubspec (with only the relevant packages)?

ebastuart commented 5 years ago

hope anything helps

Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    While building module 'GooglePlacePicker' imported from /Users/ebastuart/development/flutter/.pub-cache/hosted/pub.dartlang.org/google_places_picker-0.1.0/ios/Classes/GooglePlacesPickerPlugin.h:2:
    While building module 'GooglePlaces' imported from /Users/ebastuart/Desktop/heme/ios/Pods/GooglePlacePicker/Frameworks/GooglePlacePicker.framework/Headers/GMSPlacePickerConfig.h:17:
    In file included from <module-includes>:1:
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/GooglePlaces/Frameworks/GooglePlaces.framework/Headers/GooglePlaces.h:16:
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/GooglePlaces/Frameworks/GooglePlaces.framework/Headers/GMSPlacesClient.h:21:
    /Users/ebastuart/Desktop/heme/ios/Pods/GooglePlaces/Frameworks/GooglePlaces.framework/Headers/GMSPlacesErrors.h:73:4: warning: HTML start tag prematurely ended, expected attribute name or '>' [-Wdocumentation]
       * href="https://developers.google.com/places/ios-api/usage">usage limits guide</a> for more
       ^
    /Users/ebastuart/Desktop/heme/ios/Pods/GooglePlaces/Frameworks/GooglePlaces.framework/Headers/GMSPlacesErrors.h:72:63: note: HTML tag started here
       * the API that far exceeds normal request levels. See the <a
                                                                  ^
    /Users/ebastuart/Desktop/heme/ios/Pods/GooglePlaces/Frameworks/GooglePlaces.framework/Headers/GMSPlacesErrors.h:82:4: warning: HTML start tag prematurely ended, expected attribute name or '>' [-Wdocumentation]
       * href="https://developers.google.com/places/ios-api/usage">usage limits guide</a> for more
       ^
    /Users/ebastuart/Desktop/heme/ios/Pods/GooglePlaces/Frameworks/GooglePlaces.framework/Headers/GMSPlacesErrors.h:81:63: note: HTML tag started here
       * the API that far exceeds normal request levels. See the <a
                                                                  ^
    2 warnings generated.
    2 warnings generated.
    2 warnings generated.
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/FIRStorage.m:20:
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/Private/FIRStorageReference_Private.h:17:
    In file included from /Users/ebastuart/Desktop/heme/build/ios/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageReference.h:19:
    In file included from /Users/ebastuart/Desktop/heme/build/ios/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorage.h:19:
    /Users/ebastuart/Desktop/heme/build/ios/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageConstants.h:80:28: error: redefinition of 'FIRStorageTaskStatus'
    typedef NS_ENUM(NSInteger, FIRStorageTaskStatus) {
                               ^
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/FIRStorage.m:15:
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/Public/FIRStorage.h:19:
    /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/Public/FIRStorageConstants.h:80:28: note: previous definition is here
    typedef NS_ENUM(NSInteger, FIRStorageTaskStatus) {
                               ^
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/FIRStorage.m:20:
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/Private/FIRStorageReference_Private.h:17:
    In file included from /Users/ebastuart/Desktop/heme/build/ios/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageReference.h:19:
    In file included from /Users/ebastuart/Desktop/heme/build/ios/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorage.h:19:
    /Users/ebastuart/Desktop/heme/build/ios/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageConstants.h:84:3: error: redefinition of enumerator 'FIRStorageTaskStatusUnknown'
      FIRStorageTaskStatusUnknown,
      ^
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/FIRStorage.m:15:
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/Public/FIRStorage.h:19:
    /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/Public/FIRStorageConstants.h:84:3: note: previous definition is here
      FIRStorageTaskStatusUnknown,
      ^
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/FIRStorage.m:20:
    In file included from /Users/ebastuart/Desktop/heme/ios/Pods/FirebaseStorage/Firebase/Storage/Private/FIRStorageReference_Private.h:17:
    In file included from /Users/ebastuart/Desktop/heme/build/ios/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageReference.h:19:
    In file included from /Users/ebastuart/Desktop/heme/build/ios/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorage.h:19:
    /Users/ebastuart/Desktop/heme/build/ios/Debug-iphonesimulator/FirebaseStorage/FirebaseStorage.framework/Headers/FIRStorageConstants.h:89:3: error: redefinition of enumerator 'FIRStorageTaskStatusResume'
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.3 18D109, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.3)
[✓] VS Code (version 1.32.1)
[✓] Connected device (2 available)
# Uncomment this line to define a global platform for your project
platform :ios, '9.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 parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
      plugin = line.split(pattern=separator)
      if plugin.length == 2
        podname = plugin[0].strip()
        path = plugin[1].strip()
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname, :path => podpath});
      else
        puts "Invalid plugin specification: #{line}"
      end
  }
  return pods_ary
end

target 'Runner' do
  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  use_frameworks!
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')

  # Flutter Pods
  generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
  if generated_xcode_build_settings.empty?
    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
  end
  generated_xcode_build_settings.map { |p|
    if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
      symlink = File.join('.symlinks', 'flutter')
      File.symlink(File.dirname(p[:path]), symlink)
      pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
    end
  }

  # Plugin Pods
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.map { |p|
    symlink = File.join('.symlinks', 'plugins', p[:name])
    File.symlink(p[:path], symlink)
    pod p[:name], :path => File.join(symlink, 'ios')
  }
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end
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: ^0.1.2
  google_maps_flutter: ^0.4.0
  image_picker: ^0.5.0+3
  firebase_auth: ^0.8.1+4
  cloud_firestore: ^0.9.5+2
  firebase_storage: ^2.1.0+1
  shared_preferences: ^0.5.1+1
  connectivity: ^0.4.2
  intl: ^0.15.7
  google_places_picker: ^0.1.0
  uuid: ^2.0.0
  location: ^2.0.0
  geoflutterfire: 
    git: https://github.com/felipecesar42/GeoFlutterFire.git
felpsio commented 5 years ago

Looks like a problem of compatibility among firebase packages. I had lots of problems with the newest firestore packaged and downgraded. I suggest you to try to downgrade your packages too. The packages I'm using to handle location and database are:

firebase_auth: ^0.8.1+1
google_sign_in: ^4.0.1+1
flutter_facebook_login: ^1.2.0
cloud_firestore: ^0.9.0+2 #you have to run cd ios && pod update Firebase/Firestore
firebase_storage: ^2.1.0+1
geolocator: ^3.0.1

When using firebase it may need some additional configuration. You probably already did this, but, it's possible that you gonna have go check again

ebastuart commented 5 years ago

now it seems to working, thank you a lot @felipecesar42 for the workaround

felpsio commented 5 years ago

You're welcome. Hope this troubleshoting helps more people :)

DarshanGowda0 commented 5 years ago

I cloned the repository and I could make it working changing the geoflutterfire.podspec to:

#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
  s.name             = 'geoflutterfire'
  s.version          = '0.0.1'
  s.summary          = 'A new Flutter plugin.'
  s.swift_version    = '4.2' #I added this line
  s.description      = <<-DESC
A new Flutter plugin.
                       DESC
  s.homepage         = 'http://example.com'
  s.license          = { :file => '../LICENSE' }
  s.author           = { 'Your Company' => 'email@example.com' }
  s.source           = { :path => '.' }
  s.source_files = 'Classes/**/*'
  s.public_header_files = 'Classes/**/*.h'
  s.dependency 'Flutter'

  s.ios.deployment_target = '8.0'
end

Not sure if the 4.2 would be the best version to let on the package. If you think it is I can create a PR

@felipecesar42 Could you create a PR pointing to the stable version?

felpsio commented 5 years ago

Yes @DarshanGowda0 , just did :)

DarshanGowda0 commented 5 years ago

Thanks, @felipecesar42 😄

gustavobrian commented 5 years ago

Not, not close please...

fatal error: 'geoflutterfire/geoflutterfire-Swift.h' it can not be compiled by taking user_frameworks! when firebase_message requires remove use_frameworks?

thanks!

dirathea commented 5 years ago

I've got this error too, and when I add use_frameworks!, it broke even more on my project. any updates?

felpsio commented 5 years ago

@dirathea it's working fine for me on the version: ^2.0.3+5.

Kayes-Islam commented 5 years ago

@felpsio I'm using geoflutterfire: 2.0.3+5 and getting the same error as @ebastuart

Xcode's output: ↳ /Users/kayes/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/geoflutterfire-2.0.3+5/ios/Classes/GeoflutterfirePlugin.m:2:9: fatal error: 'geoflutterfire/geoflutterfire-Swift.h' file not found

import <geoflutterfire/geoflutterfire-Swift.h>

I am however, using the following version of flutter packages: firebase_core: ^0.4.0 firebase_auth: ^0.11.0 cloud_firestore: ^0.12.7 firebase_storage: ^3.0.2 firebase_messaging: ^5.1.2

When I inlcude use_frameworks! I get a bunch of other errors.

Do I still need to downgrade these packages to the version you suggested back in march? Could you tell me which version of these packages are working for you?

felpsio commented 5 years ago

If it helps this are the modifications I have in my Podfile

target 'Runner' do
  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  use_frameworks! # I added this line
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '5' # I added this line
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end
Kayes-Islam commented 5 years ago

@felpsio Now I get the following error, any idea? I suspect that it maybe related to something else, so I'm googling around, but please let me know if you can see it's related to the changes above.

Launching lib/main.dart on iPhone X in debug mode... Xcode build done. 10.3s Failed to build iOS app Error output from Xcode build: ↳ 2019-08-08 18:09:51.102 xcodebuild[68282:360854] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-13231/DVTFoundation/Utilities/DVTFileSystemUtilities.mm:142 Details: lstat('/Users/kayes/Dev/MyApp/build/ios/Debug-iphonesimulator/nanopb/nanopb.framework') failed with errno 2 (No such file or directory) Function: DVTRecursiveMkdirResult dvt_recursiveMkdir_returningErrorString(NSString __strong, NSString __autoreleasing *) Thread: <NSThread: 0x7f8354296d60>{number = 14, name = (null)} Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide. BUILD FAILED Xcode's output: ↳ The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor. Could not build the application for the simulator. Error launching application on iPhone X. Exited (sigterm)

felpsio commented 5 years ago

@Kayes-Islam are you sure you put the information correctly?

The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.

The text above makes me think if you didn't make a typing mistake

Kayes-Islam commented 5 years ago

@felpsio Here is the content of my ios/Podfile after the modification, in case I missed something:

# platform :ios, '9.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 parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
      plugin = line.split(pattern=separator)
      if plugin.length == 2
        podname = plugin[0].strip()
        path = plugin[1].strip()
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname, :path => podpath});
      else
        puts "Invalid plugin specification: #{line}"
      end
  }
  return pods_ary
end

target 'Runner' do
  use_frameworks! # I added this line
  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')

  # Flutter Pods
  generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
  if generated_xcode_build_settings.empty?
    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
  end
  generated_xcode_build_settings.map { |p|
    if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
      symlink = File.join('.symlinks', 'flutter')
      File.symlink(File.dirname(p[:path]), symlink)
      pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
    end
  }

  # Plugin Pods
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.map { |p|
    symlink = File.join('.symlinks', 'plugins', p[:name])
    File.symlink(p[:path], symlink)
    pod p[:name], :path => File.join(symlink, 'ios')
  }
end

# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '5'
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end
felpsio commented 5 years ago

@Kayes-Islam your Podfile looks code. Maybe open XCode and try to change the minimum ios version to 10.0 or 11.0.

eckhartcke commented 4 years ago

Success Story.

I had this issue again today when I added geoflutterfire for the first time to my project.

When I added geoflutterfire to my pubspec.yaml, I had to upgrade cloud_firestore in order for 'Packages get' to be able to solve for dependencies.

idk if this is exactly how to fix, but here is what I did.

These are my package versions. As previously mentioned, when I added geoflutterfire, I had to upgrade cloud_firestore

firebase_core: ^0.4.0+3 firebase_auth: ^0.14.0+5 cloud_firestore: ^0.13.0+1 geoflutterfire: ^2.0.3+8

I also added 'use frameworks' to the Podfile, but in retrospect, I'm not sure that was necessary.

Then:

Everything builds and runs!

Any time I've had to upgrade cloud_firestore, I've had build problems. IMO it's more about making sure that the ios Podfile is actually using the right versions of packages. The 'cd ios; pod update' is what does that.