I'm currently developing an iOS SDK using Cocoapods to manage deployment and Jazzy to generate documentation. I recently added a dependency to Google ads v8 in a subspec, and another dependency to Google ads v7 in another subspec, like this:
s.subspec 'Admob' do |admob|
admob.source_files = 'MyLib/Classes/admob/**/*.{swift,h,m}'
admob.dependency 'MyLib/Core'
admob.dependency 'Google-Mobile-Ads-SDK', '~> 8.0'
admob.xcconfig = { 'OTHER_SWIFT_FLAGS' => '$(inherited) -D SDK_ADMOB' }
end
s.subspec 'Admob7' do |admob|
admob.source_files = 'MyLib/Classes/admob7/**/*.{swift,h,m}'
admob.dependency 'MyLib/Core'
admob.dependency 'Google-Mobile-Ads-SDK', '~> 7.0'
admob.xcconfig = { 'OTHER_SWIFT_FLAGS' => '$(inherited) -D SDK_ADMOB' }
admob.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
admob.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
end
Everything is working fine, except when I want to generate doc with Jazzy. Here is my conf:
documentation: "*.md"
xcodebuild_arguments: -scheme,Tests
module: MyLib
sdk: iphone
source_directory: MyLib
podspec: MyLib.podspec
theme: fullwidth
readme: USERGUIDE.md
when I run bundle exec jazzy
I have a conflict because it wants tu use all my subspecs at the same time:
Using config file /Users/***/***/.jazzy.yaml
Analyzing dependencies
bundler: failed to load command: jazzy (/usr/local/lib/ruby/gems/2.7.0/bin/jazzy)
Pod::Informative: [!] CocoaPods could not find compatible versions for pod "Google-Mobile-Ads-SDK":
In Podfile:
MyLib/Admob (from `/Users/***/***`) was resolved to 2.8.0, which depends on
Google-Mobile-Ads-SDK (~> 8.0)
MyLib/Admob7 (from `/Users/***/***`) was resolved to 2.8.0, which depends on
Google-Mobile-Ads-SDK (~> 7.0)
Can somebody tell me if it's possible to exclude one or several subspecs from my doc generation?