SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
Tony Fabeen
 
Highload осень 2012 лекция 1
Highload осень 2012 лекция 1Highload осень 2012 лекция 1
Highload осень 2012 лекция 1
Technopark
 

La actualidad más candente (17)

Coding in the context era
Coding in the context eraCoding in the context era
Coding in the context era
 
Painless Deployment with Capistrano
Painless Deployment with CapistranoPainless Deployment with Capistrano
Painless Deployment with Capistrano
 
Learn watchOS Programming!
Learn watchOS Programming! Learn watchOS Programming!
Learn watchOS Programming!
 
The Popper Experimentation Protocol and CLI tool
The Popper Experimentation Protocol and CLI toolThe Popper Experimentation Protocol and CLI tool
The Popper Experimentation Protocol and CLI tool
 
Build-a-Gem Workshop
Build-a-Gem WorkshopBuild-a-Gem Workshop
Build-a-Gem Workshop
 
Python profilers
Python profilersPython profilers
Python profilers
 
Kopf @ Python Pizza Berlin, 2019-08-23
Kopf @ Python Pizza Berlin, 2019-08-23Kopf @ Python Pizza Berlin, 2019-08-23
Kopf @ Python Pizza Berlin, 2019-08-23
 
Simulation in R and Python
Simulation in R and PythonSimulation in R and Python
Simulation in R and Python
 
Give me 15 minutes and i'll change your view of gdb
Give me 15 minutes and i'll change your view of gdbGive me 15 minutes and i'll change your view of gdb
Give me 15 minutes and i'll change your view of gdb
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
 
No Hugging, No Learning
No Hugging, No LearningNo Hugging, No Learning
No Hugging, No Learning
 
Highload осень 2012 лекция 1
Highload осень 2012 лекция 1Highload осень 2012 лекция 1
Highload осень 2012 лекция 1
 
Docker Warsaw Meetup 12/2017 - DockerCon 2017 Recap
Docker Warsaw Meetup 12/2017 - DockerCon 2017 RecapDocker Warsaw Meetup 12/2017 - DockerCon 2017 Recap
Docker Warsaw Meetup 12/2017 - DockerCon 2017 Recap
 
Bamboo Hands on training 2016
Bamboo Hands on training 2016Bamboo Hands on training 2016
Bamboo Hands on training 2016
 
Puppet loves RSpec, why you should, too
Puppet loves RSpec, why you should, tooPuppet loves RSpec, why you should, too
Puppet loves RSpec, why you should, too
 
GDB: A Lot More Than You Knew
GDB: A Lot More Than You KnewGDB: A Lot More Than You Knew
GDB: A Lot More Than You Knew
 
PHP-VCR behat case study
PHP-VCR behat case studyPHP-VCR behat case study
PHP-VCR behat case study
 

Similar a Cocoapods sane library management for xcode

Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud
Shekhar Gulati
 
[Defcon24] Introduction to the Witchcraft Compiler Collection
[Defcon24] Introduction to the Witchcraft Compiler Collection[Defcon24] Introduction to the Witchcraft Compiler Collection
[Defcon24] Introduction to the Witchcraft Compiler Collection
Moabi.com
 

Similar a Cocoapods sane library management for xcode (20)

How to Reverse Engineer Web Applications
How to Reverse Engineer Web ApplicationsHow to Reverse Engineer Web Applications
How to Reverse Engineer Web Applications
 
Boxen: How to Manage an Army of Laptops
Boxen: How to Manage an Army of LaptopsBoxen: How to Manage an Army of Laptops
Boxen: How to Manage an Army of Laptops
 
Docker for Development
Docker for DevelopmentDocker for Development
Docker for Development
 
Docker in development
Docker in developmentDocker in development
Docker in development
 
Extending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with KubernetesExtending DevOps to Big Data Applications with Kubernetes
Extending DevOps to Big Data Applications with Kubernetes
 
Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud
 
Docker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12xDocker and-containers-for-development-and-deployment-scale12x
Docker and-containers-for-development-and-deployment-scale12x
 
Hack Rio/OS
Hack Rio/OSHack Rio/OS
Hack Rio/OS
 
Build your own discovery index of scholary e-resources
Build your own discovery index of scholary e-resourcesBuild your own discovery index of scholary e-resources
Build your own discovery index of scholary e-resources
 
[Defcon24] Introduction to the Witchcraft Compiler Collection
[Defcon24] Introduction to the Witchcraft Compiler Collection[Defcon24] Introduction to the Witchcraft Compiler Collection
[Defcon24] Introduction to the Witchcraft Compiler Collection
 
Docker Advanced registry usage
Docker Advanced registry usageDocker Advanced registry usage
Docker Advanced registry usage
 
Softshake 2013 - Let's take this offline
Softshake 2013 - Let's take this offlineSoftshake 2013 - Let's take this offline
Softshake 2013 - Let's take this offline
 
Doctrine Php Object Relational Mapper
Doctrine Php Object Relational MapperDoctrine Php Object Relational Mapper
Doctrine Php Object Relational Mapper
 
RxJava@DAUG
RxJava@DAUGRxJava@DAUG
RxJava@DAUG
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionIntroduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
 
The Self-Service Developer - GOTOCon CPH
The Self-Service Developer - GOTOCon CPHThe Self-Service Developer - GOTOCon CPH
The Self-Service Developer - GOTOCon CPH
 
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
 
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpPHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in php
 
Hands-on Lab: Red Hat Container Development & OpenShift
Hands-on Lab: Red Hat Container Development & OpenShiftHands-on Lab: Red Hat Container Development & OpenShift
Hands-on Lab: Red Hat Container Development & OpenShift
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Cocoapods sane library management for xcode

  • 1. COCOAPODS Sane library management for Xcode leonard.ehrenfried@gmail.com github.com/lenniboy
  • 2. 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?
  • 3. 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."
  • 4. WHY IS MANUAL INSTALLATION PROBLEMATIC? Error-prone Upgrade path unclear No transitive dependencies
  • 5. WORST OF ALL? THE LIBRARY SOURCE IS SUPPOSED TO BE ADDED TO VERSION CONTROL!
  • 6. 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 ?
  • 7. ENTER COCOAPODS Library dependency management for Xcode projects Community maintained Written in Ruby Modelled after Rubygems gmisalccaos e ntl oopd
  • 8. 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!
  • 10.
  • 11. 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
  • 12. IN-HOUSE DEVELOPMENT Referencing a local 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