Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Using CocoaPods for Objective-C Library Manage...

Using CocoaPods for Objective-C Library Management

Presented at OSDC.tw 2013

Richard Lee

April 20, 2013
Tweet

More Decks by Richard Lee

Other Decks in Technology

Transcript

  1. Three20 •UI collections & utilities for iOS •Derived from old

    Facebook for iPhone •#1 starred Objective-C project on GitHub •Where I started my journey to OSS •Abandoned project for around a year though •Also, Three20 is notorious for...
  2. Cocoa library installation Install Cocoa library is hard because •Library

    / framework dependencies •Automatic reference counting v.s. non-ARC •Header files import dependencies •Compiler choices (gcc / gcc-llvm / clang) •Xcode / iOS version differences
  3. Podfile lists the dependencies of your app How CocoaPods works?

    Podfile.lock locks the versions of pods Podspec contains specs of pods Pod represents a Cocoa library
  4. Sample Podfile platform :ios, :deployment_target => '5.0' pod 'Nimbus/Core' pod

    'Nimbus/NetworkControllers' pod 'Nimbus/WebController' pod 'AFNetworking' pod 'BlocksKit', '=1.5.2' pod 'SSPullToRefresh', '>=1.0.0' pod 'SDURLCache' pod 'Facebook-iOS-SDK' pod 'iCookSDK', :git => "git@..."
  5. Create Podspec Podspec describes library’s •Basic infos (Name / Description

    / Version) •Where to download? (Mostly Git) •Copyright info (Author and license) •Source files / Header files / Resource files •Compile settings •Library dependencies
  6. You can be part of us! The app universe need

    your help! •Release open source libraries •Write Podspec for others •Maintain current Podspecs Just send pull requests to CocoaPods repos!