The problem was a combination of:
- One of subpods had a dependency on another subpod which was from the same pod
- I was not running
pod lib lint
. I was relying on a test scheme and was just running tests through Xcode on the vanilla example app.
Basically my Device/Phone
subpod was dependent on Device/Core
subpod. I needed to update my Phone
podspec.
Currently it's like this:
s.subspec 'Core' do |subspec|
subspec.dependency 'RxSwift', '~> 4.5.0'
subspec.dependency 'RxCocoa', '~> 4.5.0'
subspec.source_files = 'Phone/Classes/*.{h,m,swift}', 'Phone/Classes/**/*.{h,m,swift}'
subspec.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'Phone/Tests/*.swift'
end
end
s.subspec 'Phone' do |subspec|
subspec.dependency 'RxSwift', '~> 4.5.0'
subspec.source_files = 'Phone/Classes/*.{h,m,swift}', 'Phone/Classes/**/*.{h,m,swift}'
subspec.resources = 'Phone/Classes/*.{xib}', 'Phone/Classes/**/*.{xib}'
subspec.test_spec 'Tests' do |test_spec|
test_spec.dependency 'Device', '~> 1.0.7'
test_spec.source_files = 'Phone/Tests/*.swift'
end
end
The only thing I had to add was a new dependency to my Phone
spec's dependency list:
subspec.dependency 'Device/Core',
And then I was able to do push my new spec.
pod repo push my-private-cocoapods Device.podspec --allow-warnings --verbose