My podspec looks like this:
Pod::Spec.new do |s|
s.name = 'flutter_vlc_player'
s.version = '0.0.3'
s.summary = 'A new Flutter project.'
s.description = <<-DESC
A new Flutter project.
DESC
s.homepage = 'http://example.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => '[email protected]' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'MobileVLCKit', '~> 3.3.10'
s.static_framework = true
s.ios.deployment_target = '9.0'
end
How can I set the :modular_headers => true
for the s.dependency 'MobileVLCKit', '~> 3.3.10'
? I tried to use like
s.dependency 'MobileVLCKit', '~> 3.3.10', :modular_headers => true
In the same way I would do in podfile, but it didn't work.
I know that I could use 'DEFINES_MODULE' => 'YES'
in the pod_target_xcconfig
, however it did not fix the problem with non-modular header, because of the MobileVLCKit
dependency.
The reason your s.dependency 'MobileVLCKit', '~> 3.3.10', :modular_headers => true
isn't working because podspec is a specification file for a pod, developer can state what dependency it requires and the dependency is actually resolved in the podfile itself.
One thing which you can do is in podfile
use_modular_headers!
target 'MyApp' do
pod 'SomeOtherPod', :modular_headers => false
end
post_install do |installer|
installer.pods_project.targets.each do |target|
puts "#{target.name}"
end
end
use_modular_headers!
will use modular pods for all defined including the one mentioned in podspec and :modular_headers => false
will exclude particular pod from that implementation
documentation for use_modular_headers!
I hope this answers your query
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With