Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods declaring multiple dependecies in the spec file

Tags:

cocoapods

Till now I always only had one dependency to declare in a .podspec file.

My question is:

What is the correct way to include more than one?

When I include only one I do it like this:

s.dependency = 'ReactiveCocoa'

How do I include more than one?

like image 567
zumzum Avatar asked Dec 04 '13 02:12

zumzum


1 Answers

You can have multiple calls to dependency in your podspec file, for example in RestKit.podspec:

s.subspec 'Core' do |cs|
    cs.source_files =  'Code/*.h', 'Vendor/LibComponentLogging/Core', 'Vendor/LibComponentLogging/NSLog'
    cs.header_dir   =  'RestKit'

    cs.dependency 'RestKit/ObjectMapping'
    cs.dependency 'RestKit/Network'
    cs.dependency 'RestKit/CoreData'
end
like image 164
Jonah Avatar answered Oct 31 '22 13:10

Jonah