- I have a podspec for MyLib.
- MyLib.xcworkspace has two targets: a MyLib target and a MySubLib target.
- MyLib depends on MySubLib.
- Both MyLib and MySubLib should be
import
able in a swift module usingMyLib
Cocoapod.
Illustration:
MyLib.xcworkspace
- MyLib target <---depends on---MySubLib
- MyLib pods dependencies
- MySubLib target
How do we achieve this?
I have the following podspec but upon linting MySubLib is not found where it's import
ed in MyLib.
Pod::Spec.new do |s|
s.name = "MyLib"
s.version = "0.1"
s.summary = ""
s.description = <<-DESC
DESC
s.homepage = "https://github.com/me/MyLib"
s.license = 'MIT'
s.author = { "me" => "[email protected]" }
s.source = { :git => "https://github.com/me/MyLib.git", :tag => s.version.to_s }
s.platform = :ios, '8.0'
s.requires_arc = true
s.dependency 'Alamofire'
s.source_files = 'MyLib/**/*.swift', 'MySubLib/**/*.swift'
s.resource_bundles = {
}
end
You can use
subspec
. I use it in my framework L10n-swift.Going back to your problem
You can also define
default_subspec