Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
pod 0.1.0-dev not accepted for required version 0.1.0 (without -dev suffix)
I have following setup:
- flutter plugin with an example app
- the plugin depends on a native library (
flutter_plugin.podspec
containss.dependency 'native-lib', '0.1.0'
) - for local development I pull in the native library in the example app
Podfile
viapod 'native-lib', :path => '../../dependencies/native-lib/ios/'
- the local
native-lib.podspec
setss.version = '0.1.0-dev'
With this setup I would expect pods install
to pull in the local lib. Instead, it says:
[!] CocoaPods could not find compatible versions for pod "native-lib":
In Podfile:
native-lib (from `../../dependencies/native-lib/ios/`)
flutter_plugin (from `.symlinks/plugins/flutter_plugin/ios`) was resolved to 0.0.1, which depends on
native-lib (= 0.1.0,)
Not even specifying s.dependency 'native-lib', '0.1.0', '0.1.0-dev'
(or s.dependency 'native-lib', '0.1.0-dev', '0.1.0'
) in the .podspec
works. What does work is using 0.1.0-dev
but that will probably break when the real 0.1.0
is offered.
Why does the Podfile/podspec not accept 0.1.0-dev when the requirement is 0.1.0?
The Podfile documentation says:
~> 0.1.3-beta.0 Beta and release versions for 0.1.3, release versions up to 0.2 excluding 0.2. Components separated by a dash (-) will not be considered for the version requirement.
But even specifying ~> 0.1.0
as required version does not pick up 0.1.0-dev
.
The podspec documentation does not mention dash suffixes.
1 comment thread