COCOAPODS Sane library management for Xcode leonard.ehrenfried@gmail.com github.com/lenniboy
SO, YOU'RE STARTING A NEW XCODE PROJECT Look for some libraries to use in your project Maybe an OAuth ibrary? How to import it into your project?
INSTALLATION INSTRUCTIONS 1. drag the O u h C i n . c d p o into your project At2letxoerj 2. add O u h C i n as a build dependency At2let 3. add O u h C i n / * your user header search path in the build settings A t 2 l e t * to 4. link your target against O u h C i n (drag the OAuth2Client product from At2let OAuth2Client.xcodeproj to your targets Link Binary With Libraries) 5. # m o t " X A t 2 h ipr NOuh."
WHY IS MANUAL INSTALLATION PROBLEMATIC? Error-prone Upgrade path unclear No transitive dependencies
WORST OF ALL? THE LIBRARY SOURCE IS SUPPOSED TO BE ADDED TO VERSION CONTROL!
OTHER LANGUAGES AND PLATFORMS HAVE AUTOMATED ALL OF THIS Python has e s _ n t l / i ayisalpp Ruby has g m e JavaScript has n m p Java has Maven Objective-C has ?
ENTER COCOAPODS Library dependency management for Xcode projects Community maintained Written in Ruby Modelled after Rubygems gmisalccaos e ntl oopd
GREAT, HOW DOES IT WORK? 1. Create an Xcode project 2. Add a P d i e your project folder o f l to 3. Add your dependency to it 4. pdisal o ntl 5. Compiles your library dependency as a static library 6. Takes your project and puts it into an Xcode workspace 7. Adds static library to workspace 8. You open A p x w r s a e p . c o k p c instead of A p x p o e t p.crjc 9. Profit!!1!
DEMO TIME
ANATOMY OF A PODSPEC Pd:pcnwd || o:Se.e o s snm .ae ='BrgesU' MPorsHD svrin ='.' .eso 05 spafr =:o .ltom is slcne ='I' .ies MT ssmay ='niSatvt idctrve. .umr A O ciiy niao iw' shmpg ='tp:/ihbcmmtjMPorsHD .oeae hts/gtu.o/ae/BrgesU' sato .uhr ={'ae Bkvnk'= 'ae@uoisicm, Mtj uoisi > mtjbkvnk.o' 'oahnGog' = 'oahnjgnt } Jnta ere > jnta@d.e' ssuc .ore ={:i = 'tp:/ihbcmjgMPorsHDgt,:a = '.'} gt > hts/gtu.o/d/BrgesU.i' tg > 05 ssuc_ie ='.hm' .orefls *{,} sfaeok .rmwr ="oerpis CrGahc" ed n
IN-HOUSE DEVELOPMENT Referencing a local folder in a p d p c ose Host your own repository of p d p c oses
RANDOM FEATURE OVERVIEW Last night: 589 pods Contributing is easy, just fork and create a pull request Handles difference between ARC and non-ARC dependencies : e t : e scopes available ts/dv iOS and OSX dependencies
THE END QUESTIONS? cocoapods.org
Cocoapods sane library management for xcode

Cocoapods sane library management for xcode

  • 1.
    COCOAPODS Sane library managementfor Xcode leonard.ehrenfried@gmail.com github.com/lenniboy
  • 2.
    SO, YOU'RE STARTINGA NEW XCODE PROJECT Look for some libraries to use in your project Maybe an OAuth ibrary? How to import it into your project?
  • 3.
    INSTALLATION INSTRUCTIONS 1. dragthe O u h C i n . c d p o into your project At2letxoerj 2. add O u h C i n as a build dependency At2let 3. add O u h C i n / * your user header search path in the build settings A t 2 l e t * to 4. link your target against O u h C i n (drag the OAuth2Client product from At2let OAuth2Client.xcodeproj to your targets Link Binary With Libraries) 5. # m o t " X A t 2 h ipr NOuh."
  • 4.
    WHY IS MANUALINSTALLATION PROBLEMATIC? Error-prone Upgrade path unclear No transitive dependencies
  • 5.
    WORST OF ALL? THELIBRARY SOURCE IS SUPPOSED TO BE ADDED TO VERSION CONTROL!
  • 6.
    OTHER LANGUAGES ANDPLATFORMS HAVE AUTOMATED ALL OF THIS Python has e s _ n t l / i ayisalpp Ruby has g m e JavaScript has n m p Java has Maven Objective-C has ?
  • 7.
    ENTER COCOAPODS Library dependencymanagement for Xcode projects Community maintained Written in Ruby Modelled after Rubygems gmisalccaos e ntl oopd
  • 8.
    GREAT, HOW DOESIT WORK? 1. Create an Xcode project 2. Add a P d i e your project folder o f l to 3. Add your dependency to it 4. pdisal o ntl 5. Compiles your library dependency as a static library 6. Takes your project and puts it into an Xcode workspace 7. Adds static library to workspace 8. You open A p x w r s a e p . c o k p c instead of A p x p o e t p.crjc 9. Profit!!1!
  • 9.
  • 11.
    ANATOMY OF APODSPEC Pd:pcnwd || o:Se.e o s snm .ae ='BrgesU' MPorsHD svrin ='.' .eso 05 spafr =:o .ltom is slcne ='I' .ies MT ssmay ='niSatvt idctrve. .umr A O ciiy niao iw' shmpg ='tp:/ihbcmmtjMPorsHD .oeae hts/gtu.o/ae/BrgesU' sato .uhr ={'ae Bkvnk'= 'ae@uoisicm, Mtj uoisi > mtjbkvnk.o' 'oahnGog' = 'oahnjgnt } Jnta ere > jnta@d.e' ssuc .ore ={:i = 'tp:/ihbcmjgMPorsHDgt,:a = '.'} gt > hts/gtu.o/d/BrgesU.i' tg > 05 ssuc_ie ='.hm' .orefls *{,} sfaeok .rmwr ="oerpis CrGahc" ed n
  • 12.
    IN-HOUSE DEVELOPMENT Referencing alocal folder in a p d p c ose Host your own repository of p d p c oses
  • 13.
    RANDOM FEATURE OVERVIEW Last night: 589 pods Contributing is easy, just fork and create a pull request Handles difference between ARC and non-ARC dependencies : e t : e scopes available ts/dv iOS and OSX dependencies
  • 14.