sudo gem install cocoapods
$ pod init
$ pod 'X', '~> 1.1'
$ pod 'Y', :git => 'https://github.com/NSHipster/Y.git', :commit => 'b4dc0ffee'
$ pod install
$ pod update
NSHipsterKit.podspec
Pod::Spec.new do |s|
s.name = 'NSHipsterKit'
s.version = '1.0.0'
s.license = 'MIT'
s.summary = "A pretty obscure library. You've probably never heard of it."
s.homepage = 'http://nshipster.com'
s.authors = { 'Mattt Thompson' =>
'[email protected]' }
s.social_media_url = "https://twitter.com/mattt"
s.source = { :git => 'https://github.com/nshipster/NSHipsterKit.git', :tag => '1.0.0' }
s.source_files = 'NSHipsterKit'
end
A .podspec file can be useful for organizing internal or private dependencies as well:
pod 'Z', :path => 'path/to/directory/with/podspec'