CFHipsterRef Low-Level Programming on iOS & Mac OS X

CocoaPods

Installing CocoaPods

sudo gem install cocoapods

Managing Dependencies

$ pod init

$ pod 'X', '~> 1.1'

$ pod 'Y', :git => 'https://github.com/NSHipster/Y.git', :commit => 'b4dc0ffee'

$ pod install

$ pod update

Trying Out a CocoaPod

Creating a CocoaPod

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'

Specification

Publishing a CocoaPod