Search code examples
dartflutterrxdart

How can I downgrade the rxdart plugin in flutter?


I followed this as shown (only first 3 minutes are relevant for my question): https://m.youtube.com/watch?v=MYHVyl-juUk

When I try to run it this appears in the console:

Because geoflutterfire 2.0.3+2 depends on rxdart ^0.20.0 and no versions of geoflutterfire match >2.0.3+2 <3.0.0, geoflutterfire ^2.0.3+2 requires rxdart ^0.20.0. So, because my_app depends on both rxdart ^0.21.0 and geoflutterfire ^2.0.3+2, version solving failed.

The current Version (and the Version I installed) is rxdart 0.21.0. I tried to downgrade it by changing it to 0.20.0 and flutter packages get, but it didn’t work.

Btw, it’s my first time experimenting with plugins, so I don’t have any clue about solving that kind of problems...

What can I do to make this work?

Kind regards

UPDATE:

After I tried this:

rxdart: any

the console threw this:

2019-04-08 12:06:04.178 defaults[36786:354646] 
The domain/default pair of (/Users/privat/Documents/Dev/my_app/ios/Runner/Info, CFBundleIdentifier) does not exist


Xcode's output:
↳
    /Library/flutter/.pub-cache/hosted/pub.dartlang.org/geoflutterfire-2.0.3+2/ios/Classes/GeoflutterfirePlugin.m:2:9: fatal error:
    'geoflutterfire/geoflutterfire-Swift.h' file not found
    #import <geoflutterfire/geoflutterfire-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Then I edited the Podfile Code: Code that needed to be added or edited are marked with "** ...... **"

    target 'Runner' do
      ** use_frameworks!  **
    ........ ......

    post_install do |installer|
          installer.pods_project.targets.each do |target|
            target.build_configurations.each do |config|
              config.build_settings['ENABLE_BITCODE'] = 'NO'
              ** config.build_settings['SWIFT_VERSION'] = '4.0' **
            end
          end
        end

Then I deleted my Podfile.lock and tried again, and the app was compiled successfully. Thanks to C4C!


Solution

  • please try this edits in Podfile Code needs to be added or edited are marked with "** ...... **"

    target 'Runner' do
      ** use_frameworks!  **
    ........ ......
    
    post_install do |installer|
          installer.pods_project.targets.each do |target|
            target.build_configurations.each do |config|
              config.build_settings['ENABLE_BITCODE'] = 'NO'
              ** config.build_settings['SWIFT_VERSION'] = '4.0' **
            end
          end
        end
    

    delete your Podfile.lock and try