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

Introduction to Cocoapods

Introduction to Cocoapods

A talk about Cocoapods and how we can go faster with using it.

I gave this talk to the "The Mobile Company" (http://themobilecompany.com/) developers on May 22th, 2013.

Javi Lorbada

May 22, 2013
Tweet

More Decks by Javi Lorbada

Other Decks in Programming

Transcript

  1. Javi%Lorbada
    CocoaPods

    View Slide

  2. Javi%Lorbada
    CocoaPods is an easy-to-use dependency management tool for iOS and
    OS X development.
    Instead of downloading some code from GitHub, or even our own libraries
    and copying them to our projects (and thus making future updates a pain),
    we can let CocoaPods do it all for us!
    What’s CocoaPods?
    According their website cocoapods is:
    “The best way to manage library dependencies in Objective-C projects.”
    and, so far, at least at the present time the advertising is true :)

    View Slide

  3. Javi%Lorbada
    Make our life easier
    Save time
    Automate everything
    Consistent Workspaces
    Easy updates
    Dependency resolution
    Huge community
    Docs for free
    Why CocoaPods?
    Working with third party libraries in an Xcode project isn’t always easy and
    it can often be a pain, especially when integrating non-ARC libraries in an
    ARC-enabled project.

    View Slide

  4. Javi%Lorbada
    Pod Specifies a dependency of the
    project, represents a library.
    Podfile
    The Podfile is a specification that
    describes the dependencies of the
    targets of one or more Xcode.
    projects.
    Podspec Is the specs of the pods, our
    library.
    Podfile.lock The lock versions of our pods.
    How CocoaPods works?

    View Slide

  5. Javi%Lorbada
    Pod Specifies a dependency of the
    project, represents a library.
    Podfile
    The Podfile is a specification that
    describes the dependencies of the
    targets of one or more Xcode.
    projects.
    Podspec Is the specs of the pods, our
    library.
    Podfile.lock The lock versions of our pods.
    How CocoaPods works?

    View Slide

  6. Javi%Lorbada
    Pod Specifies a dependency of the
    project, represents a library.
    Podfile
    The Podfile is a specification that
    describes the dependencies of the
    targets of one or more Xcode.
    projects.
    Podspec Is the specs of the pods, our
    library.
    Podfile.lock The lock versions of our pods.
    How CocoaPods works?

    View Slide

  7. Javi%Lorbada
    Pod Specifies a dependency of the
    project, represents a library.
    Podfile
    The Podfile is a specification that
    describes the dependencies of the
    targets of one or more Xcode.
    projects.
    Podspec Is the specs of the pods, our
    library.
    Podfile.lock The lock versions of our pods.
    How CocoaPods works?

    View Slide

  8. Javi%Lorbada
    How to start with CocoaPods?
    Create Xcode project
    Install CocoaPods
    Configure for your private Pods
    Create our Podfile
    Install dependencies (Pods)
    Open Workspace and enjoy!

    View Slide

  9. Javi%Lorbada
    Create Xcode Project

    View Slide

  10. Javi%Lorbada
    Install
    CocoaPods.
    $"[sudo]"gem"install"cocoapods
    $"pod"setup
    Configure for
    TMC Pods. $"pod"repo"add""
    Create our
    Podfile.
    $"cd"/../../
    $"vim"Podfile
    Install
    dependencies.
    $"pod"install
    Open workspace and"enjoy!
    Demo

    View Slide

  11. Javi%Lorbada
    Install
    CocoaPods.
    $"[sudo]"gem"install"cocoapods
    $"pod"setup
    Configure for
    TMC Pods. $"pod"repo"add""
    Create our
    Podfile.
    $"cd"/../../
    $"vim"Podfile
    Install
    dependencies.
    $"pod"install
    Open workspace and"enjoy!
    Demo

    View Slide

  12. Javi%Lorbada
    Install
    CocoaPods.
    $"[sudo]"gem"install"cocoapods
    $"pod"setup
    Configure for
    TMC Pods. $"pod"repo"add""
    Create our
    Podfile.
    $"cd"/../../
    $"vim"Podfile
    Install
    dependencies.
    $"pod"install
    Open workspace and"enjoy!
    Demo

    View Slide

  13. Javi%Lorbada
    Install
    CocoaPods.
    $"[sudo]"gem"install"cocoapods
    $"pod"setup
    Configure for
    TMC Pods. $"pod"repo"add""
    Create our
    Podfile.
    $"cd"/../../
    $"vim"Podfile
    Install
    dependencies.
    $"pod"install
    Open workspace and"enjoy!
    Demo

    View Slide

  14. Javi%Lorbada
    Install
    CocoaPods.
    $"[sudo]"gem"install"cocoapods
    $"pod"setup
    Configure for
    TMC Pods. $"pod"repo"add""
    Create our
    Podfile.
    $"cd"/../../
    $"vim"Podfile
    Install
    dependencies.
    $"pod"install
    Open workspace and"enjoy!
    Demo

    View Slide

  15. Javi%Lorbada
    Questions?

    View Slide

  16. Javi%Lorbada
    Sources
    • Cocoapods
    • Using CocoaPods for in-house components
    • Getting Started With CocoaPods
    • Advanced dependencies with CocoaPods
    • Streamlining Cocoa Development With CocoaPods

    View Slide

  17. Thank you!!
    Javi%Lorbada
    javilorbada.me

    View Slide