I have a flutter plugin (let's say it's named plugin
) that needs to have a separate debug build (say debug/foo.framework
) and a release build (release/foo.framework
) and they should be used in the respective app builds. Is there a way to do this?
Pod::Spec.new do |s|
...
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework foo' }
s.vendored_frameworks = 'foo.framework'
end
What I'd want, conceptually, is something like this (should work for dependency
, but doesn't for vendored_framework
- says file: undefined method 'vendored_frameworks'
)
Pod::Spec.new do |s|
...
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework foo' }
s.vendored_frameworks 'debug/foo.framework', :configurations => ['Debug']
s.vendored_frameworks 'release/foo.framework', :configurations => ['Release']
I've also tried this, but it fails with circular dependency:
Pod::Spec.new do |s|
s.name = 'plugin'
...
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework foo' }
s.subspec 'debug' do |cs|
cs.vendored_frameworks = 'debug/foo.framework'
end
s.subspec 'release' do |cs|
cs.vendored_frameworks = 'release/foo.framework'
end
s.default_subspecs = :none
s.dependency 'plugin/debug', :configurations => ['Debug']
s.dependency 'plugin/release', :configurations => ['Release']
end