Flutter keeps importing old version of Plugin for iOS
In your case I take a look in plugin source on github and a see that you aren't updating the version of your plugin in your upetch_paysquare_service.podspec
file.
This is your current version:
Pod::Spec.new do |s|
s.name = 'upetch_paysquare_service'
s.version = '0.0.2'#I Think you should update this field with '0.0.7'
s.summary = 'A Flutter plugin for RazorPay SDK'
s.description = <<-DESC
Try update in your plugin to:
Pod::Spec.new do |s|
s.name = 'upetch_paysquare_service'
s.version = '0.0.7' #New Version
s.summary = 'A Flutter plugin for RazorPay SDK'
s.description = <<-DESC
This change can help the apps that are using your plugin get the current version when the developer run pod install or pod update
.
Why am I telling this?
Well, I had a problem like yours a few days ago but in a different case. In my case was in an app that I am developing and all plugins and versions are working pretty fine on android side but when I start on iOS platform the things was not pretty well.
On iOS side all the plugins are coming with different versions that I declared in pubspec file, mostly in '0.0.1' version, and I was able to workaround this updating the specific_plugin.podspec
file of each one. I really don't know if this is the correct way to solve this problem but in my case it's working!
But one exception! In my case the geolocator plugin was the only one that are coming with correct version declared in pubspec file and I see that in his geolocator.podspec file the current version was updated in s.version
property. I suppose that pod update or pod install
read this field to download the right plugin version.
Pritish
Updated on December 10, 2022Comments
-
Pritish over 1 year
I have create a plugin which can be found at following url https://pub.dartlang.org/packages/upetch_paysquare_service#-versions-tab-
I imported the plugin in separate flutter project's pubspec as follows
upetch_paysquare_service: ^0.0.7
The Android part works fine. when I open the project in Xcode to run on iOS device, I get error saying
could not find file included pods..
So I decide to update my pods I went to terminal I keep getting error saying I did not specified any swift version in my plugin but I have specified swift version in my plugin project's pod file as follows
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '4.2' # required config.build_settings['ENABLE_BITCODE'] = 'NO' end end end
My main question is whenever I do
pod update
orpod install
, the version of plugin getting installed is 0.0.2 but I am importing version 0.0.7 in mypubspec.yaml
file.Here is the screenshot