SlideShare a Scribd company logo
Manage your external
libraries with CocoaPods
Juan Catalan
jcatalan007@gmail.com
About me
• Senior iOS developer working at Actsoft, Inc, in
sunny Tampa, FL, USA
• Started iOS development in 2009
• 20+ apps in the App Store
• Objective C veteran, Swift enthusiast
Agenda
• What is CocoaPods and why you should use it
• CocoaPods.org
• Demo: Setting up and using CocoaPods
• Alternatives to CocoaPods
What is CocoaPods?
• CocoaPods is a dependency manager for Swift and
Objective-C Cocoa projects. It has over 30 thousand
libraries and is used in over 1.9 million apps. CocoaPods
can help you scale your projects elegantly.
• A dependency manager is a tool that manages the third
party frameworks and packages you include in your Xcode
project in order to build your app.
• A framework is a reusable set of libraries or classes for a
software system
 https://cocoapods.org
What is CocoaPods?
• Apple includes many frameworks as part of the
iOS SDK, however some times you need to
implement a functionality that is not included in
the iOS SDK.
• Instead of investing a lot of time implementing a
feature by yourself, you could use a third party
library to implement the desired functionality.
Why CocoaPods?
• Using third party libraries without a dependency manager
poses some challenges:
• Updating a library to a newer version could be problematic,
specially if it depends on another library.
• Modifying a library could introduce incompatible changes
with future versions of that library
• It’s difficult to keep track of each version of a library used in
your code
• Discovering new library is difficult without a centralized
location to see all the available libraries.
Why CocoaPods?
• Cocapods provides a solution to the problems mentioned
before:
• Fetches the code for the libraries and includes it in your
Xcode project in an automated way
• Keeps track of the version of the library and its updates when
needed
• Keeps track and resolves dependencies between the different
libraries used
• Provides a centralized repository with more that 30,000
libraries
Demo: cocoapods.org
CocoaPods.org
• Homepage:
• Search
• Quick installation and getting started
• Create a pod
CocoaPods.org
• Search:
• ImagePicker with multiple images
• Facebook
• Realm, Firebase
• Zip, ISO8601
CocoaPods.org
• Guides
• Blog
• CocoaDocs: cocoadocs.org
• AFNetworking
• Facebook-iOS-SDK / FacebookCore
Demo: NASA Images
sample app
NASA Images
• Downloads pictures from the Astronomy Picture of
the Day website (https://apod.nasa.gov) and
shows the pictures in a scrolling list view.
• Uses NASA Open API web services
• Uses best practices: parallel downloads, smooth
UI scrolling while downloads are in progress,
provides a mechanism to refresh the UI, etc.
NASA Images
NASA Images
NASA Images
• Downloads pictures from the Astronomy Picture of
the Day website (https://apod.nasa.gov) and
shows the pictures in a scrolling table view.
• Uses NASA Open API web services
• Uses best practices: parallel downloads, smooth
UI scrolling while downloads are in progress,
provides a mechanism to refresh the UI, etc.
Networking
JSON
Image Downloader
NASA Images
UITableView
UILabel
UIImageViewUIRefreshControl
UITextView
Progress Indicator
Demo: NASA Images
sample app
NASA Images
• sudo gem install cocoapods | pod setup --verbose
• pod init -> show file system
• modify pod file
• pod install -> Show terminal, show file system
• Show Podfile.lock and explain
• Show Pods directory and explain
• close Xcode project and open Xcode workspace
• Show Xcode project file navigator
• Show podfile
• Add podfile to project (drag and drop, uncheck copy if needed, Ruby script)
• Import statements in project source files
NASA Images
• go to https://api.nasa.gov/api.html#apod
• show specifications for the endpoint
• show example JSON returned (use browser)
• show code for Alamofire GET request
• show code using SwiftyJSON
• show code for HUD
• show code for Image Downloader
Pod file examples
• podfile and podfile.lock
Best practices
• Under source control:
• podfile
• podfile.lock
• .xcworkspace
• PODS directory - controversy
• Pod install vs Pod update - be in control
Alternatives to CocoaPods
• Carthage
• A decentralized dependency manager
• Swift Package Manager
• Only available in Mac OS and Linux apps
Thanks!
• Source code
https://github.com/jcatalan007/cocoapods-talk
• Slides
https://www.slideshare.net/jcatalan007/manage-
your-external-libraries-with-cocoapods

More Related Content

What's hot

DevOps for Scala
DevOps for ScalaDevOps for Scala
DevOps for Scala
Michele Sciabarrà
 
PALASH SL GUPTA
PALASH SL GUPTAPALASH SL GUPTA
PALASH SL GUPTA
PALASH GUPTA
 
Thoughts on building deployable and updatable share point solutions
Thoughts on building deployable and updatable share point solutionsThoughts on building deployable and updatable share point solutions
Thoughts on building deployable and updatable share point solutions
Serge van den Oever
 
The new java developers kit bag
The new java developers kit bagThe new java developers kit bag
The new java developers kit bag
Jamie Coleman
 
REST In Action: The Live Coverage Platform at the New York Times
REST In Action: The Live Coverage Platform at the New York TimesREST In Action: The Live Coverage Platform at the New York Times
REST In Action: The Live Coverage Platform at the New York Times
Scott Taylor
 
Automate your Development Environments with Vagrant
Automate your Development Environments with VagrantAutomate your Development Environments with Vagrant
Automate your Development Environments with Vagrant
cacois
 
Java1
Java1Java1
Java1
Java1Java1
Live Coverage at The New York Times
Live Coverage at The New York TimesLive Coverage at The New York Times
Live Coverage at The New York Times
Scott Taylor
 
ASU DUG Content Access Control and Workflow
ASU DUG Content Access Control and WorkflowASU DUG Content Access Control and Workflow
ASU DUG Content Access Control and Workflow
Jeff Beeman
 
Alfresco Day Stockholm 2015 - Rapid UI Development
Alfresco Day Stockholm 2015 - Rapid UI DevelopmentAlfresco Day Stockholm 2015 - Rapid UI Development
Alfresco Day Stockholm 2015 - Rapid UI Development
Nicole Szigeti
 
NCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streamsNCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streams
Frank van der Linden
 
Actors Set the Stage for Project Orleans
Actors Set the Stage for Project OrleansActors Set the Stage for Project Orleans
Actors Set the Stage for Project Orleans
cjmyers
 
PLAT-5 Jive, Dropbox & Other Integrations
PLAT-5 Jive, Dropbox & Other IntegrationsPLAT-5 Jive, Dropbox & Other Integrations
PLAT-5 Jive, Dropbox & Other Integrations
Alfresco Software
 
One drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp CaceresOne drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp Cacereshernanibf
 
2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote
Scott Taylor
 
Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8
Christian Posta
 
eMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseeMusic: WordPress in the Enterprise
eMusic: WordPress in the Enterprise
Scott Taylor
 
CollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPagesCollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPages
Jesse Gallagher
 
Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model framework
Neil Mackenzie
 

What's hot (20)

DevOps for Scala
DevOps for ScalaDevOps for Scala
DevOps for Scala
 
PALASH SL GUPTA
PALASH SL GUPTAPALASH SL GUPTA
PALASH SL GUPTA
 
Thoughts on building deployable and updatable share point solutions
Thoughts on building deployable and updatable share point solutionsThoughts on building deployable and updatable share point solutions
Thoughts on building deployable and updatable share point solutions
 
The new java developers kit bag
The new java developers kit bagThe new java developers kit bag
The new java developers kit bag
 
REST In Action: The Live Coverage Platform at the New York Times
REST In Action: The Live Coverage Platform at the New York TimesREST In Action: The Live Coverage Platform at the New York Times
REST In Action: The Live Coverage Platform at the New York Times
 
Automate your Development Environments with Vagrant
Automate your Development Environments with VagrantAutomate your Development Environments with Vagrant
Automate your Development Environments with Vagrant
 
Java1
Java1Java1
Java1
 
Java1
Java1Java1
Java1
 
Live Coverage at The New York Times
Live Coverage at The New York TimesLive Coverage at The New York Times
Live Coverage at The New York Times
 
ASU DUG Content Access Control and Workflow
ASU DUG Content Access Control and WorkflowASU DUG Content Access Control and Workflow
ASU DUG Content Access Control and Workflow
 
Alfresco Day Stockholm 2015 - Rapid UI Development
Alfresco Day Stockholm 2015 - Rapid UI DevelopmentAlfresco Day Stockholm 2015 - Rapid UI Development
Alfresco Day Stockholm 2015 - Rapid UI Development
 
NCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streamsNCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streams
 
Actors Set the Stage for Project Orleans
Actors Set the Stage for Project OrleansActors Set the Stage for Project Orleans
Actors Set the Stage for Project Orleans
 
PLAT-5 Jive, Dropbox & Other Integrations
PLAT-5 Jive, Dropbox & Other IntegrationsPLAT-5 Jive, Dropbox & Other Integrations
PLAT-5 Jive, Dropbox & Other Integrations
 
One drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp CaceresOne drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp Caceres
 
2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote2015 WordCamp Maine Keynote
2015 WordCamp Maine Keynote
 
Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8
 
eMusic: WordPress in the Enterprise
eMusic: WordPress in the EnterpriseeMusic: WordPress in the Enterprise
eMusic: WordPress in the Enterprise
 
CollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPagesCollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPages
 
Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model framework
 

Similar to Manage your external libraries with CocoaPods

osCaddie Drupal/Alfresco Integration Technical Update
osCaddie Drupal/Alfresco Integration Technical UpdateosCaddie Drupal/Alfresco Integration Technical Update
osCaddie Drupal/Alfresco Integration Technical Update
Appnovation Technologies
 
Private pod support using cocoa pods in ios
Private pod support using cocoa pods in iosPrivate pod support using cocoa pods in ios
Private pod support using cocoa pods in ios
Azilen Technologies Pvt. Ltd.
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012
Steven Pousty
 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer ToolsWO Community
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
Ivano Malavolta
 
Cocoapods in action
Cocoapods in actionCocoapods in action
Cocoapods in action
Han Qin
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Josh Padnick
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy VirinCocoaHeads France
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
Ivano Malavolta
 
Cocoapods
CocoapodsCocoapods
Cocoapods
Bill Kunneke
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
Egor Tolstoy
 
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
Nuxeo
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)jeresig
 
What is CocoaPods and how to setup?
What is CocoaPods and how to setup?What is CocoaPods and how to setup?
What is CocoaPods and how to setup?
Milan Panchal
 
Apereo OAE - Bootcamp
Apereo OAE - BootcampApereo OAE - Bootcamp
Apereo OAE - Bootcamp
Nicolaas Matthijs
 
A brief intro to RubyMotion
A brief intro to RubyMotionA brief intro to RubyMotion
A brief intro to RubyMotion
Kamil Lelonek
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPods
CocoaHeads France
 
Cocoapods Overview - library dependency manager for iOS
Cocoapods Overview - library dependency manager for iOSCocoapods Overview - library dependency manager for iOS
Cocoapods Overview - library dependency manager for iOS
Prajwal S Prakash
 
Jetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserJetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserlittlebtc
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
damovsky
 

Similar to Manage your external libraries with CocoaPods (20)

osCaddie Drupal/Alfresco Integration Technical Update
osCaddie Drupal/Alfresco Integration Technical UpdateosCaddie Drupal/Alfresco Integration Technical Update
osCaddie Drupal/Alfresco Integration Technical Update
 
Private pod support using cocoa pods in ios
Private pod support using cocoa pods in iosPrivate pod support using cocoa pods in ios
Private pod support using cocoa pods in ios
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012
 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer Tools
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
Cocoapods in action
Cocoapods in actionCocoapods in action
Cocoapods in action
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
 
Cocoapods
CocoapodsCocoapods
Cocoapods
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
A Platform Approach to Enterprise Content Management with Eclipse Apricot, CM...
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
 
What is CocoaPods and how to setup?
What is CocoaPods and how to setup?What is CocoaPods and how to setup?
What is CocoaPods and how to setup?
 
Apereo OAE - Bootcamp
Apereo OAE - BootcampApereo OAE - Bootcamp
Apereo OAE - Bootcamp
 
A brief intro to RubyMotion
A brief intro to RubyMotionA brief intro to RubyMotion
A brief intro to RubyMotion
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPods
 
Cocoapods Overview - library dependency manager for iOS
Cocoapods Overview - library dependency manager for iOSCocoapods Overview - library dependency manager for iOS
Cocoapods Overview - library dependency manager for iOS
 
Jetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browserJetpack SDK: The new possibility of the extensions on browser
Jetpack SDK: The new possibility of the extensions on browser
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 

Recently uploaded

Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 

Recently uploaded (20)

Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 

Manage your external libraries with CocoaPods

  • 1. Manage your external libraries with CocoaPods Juan Catalan jcatalan007@gmail.com
  • 2. About me • Senior iOS developer working at Actsoft, Inc, in sunny Tampa, FL, USA • Started iOS development in 2009 • 20+ apps in the App Store • Objective C veteran, Swift enthusiast
  • 3. Agenda • What is CocoaPods and why you should use it • CocoaPods.org • Demo: Setting up and using CocoaPods • Alternatives to CocoaPods
  • 4. What is CocoaPods? • CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It has over 30 thousand libraries and is used in over 1.9 million apps. CocoaPods can help you scale your projects elegantly. • A dependency manager is a tool that manages the third party frameworks and packages you include in your Xcode project in order to build your app. • A framework is a reusable set of libraries or classes for a software system  https://cocoapods.org
  • 5. What is CocoaPods? • Apple includes many frameworks as part of the iOS SDK, however some times you need to implement a functionality that is not included in the iOS SDK. • Instead of investing a lot of time implementing a feature by yourself, you could use a third party library to implement the desired functionality.
  • 6. Why CocoaPods? • Using third party libraries without a dependency manager poses some challenges: • Updating a library to a newer version could be problematic, specially if it depends on another library. • Modifying a library could introduce incompatible changes with future versions of that library • It’s difficult to keep track of each version of a library used in your code • Discovering new library is difficult without a centralized location to see all the available libraries.
  • 7. Why CocoaPods? • Cocapods provides a solution to the problems mentioned before: • Fetches the code for the libraries and includes it in your Xcode project in an automated way • Keeps track of the version of the library and its updates when needed • Keeps track and resolves dependencies between the different libraries used • Provides a centralized repository with more that 30,000 libraries
  • 9. CocoaPods.org • Homepage: • Search • Quick installation and getting started • Create a pod
  • 10. CocoaPods.org • Search: • ImagePicker with multiple images • Facebook • Realm, Firebase • Zip, ISO8601
  • 11. CocoaPods.org • Guides • Blog • CocoaDocs: cocoadocs.org • AFNetworking • Facebook-iOS-SDK / FacebookCore
  • 13. NASA Images • Downloads pictures from the Astronomy Picture of the Day website (https://apod.nasa.gov) and shows the pictures in a scrolling list view. • Uses NASA Open API web services • Uses best practices: parallel downloads, smooth UI scrolling while downloads are in progress, provides a mechanism to refresh the UI, etc.
  • 16. NASA Images • Downloads pictures from the Astronomy Picture of the Day website (https://apod.nasa.gov) and shows the pictures in a scrolling table view. • Uses NASA Open API web services • Uses best practices: parallel downloads, smooth UI scrolling while downloads are in progress, provides a mechanism to refresh the UI, etc. Networking JSON Image Downloader
  • 19. NASA Images • sudo gem install cocoapods | pod setup --verbose • pod init -> show file system • modify pod file • pod install -> Show terminal, show file system • Show Podfile.lock and explain • Show Pods directory and explain • close Xcode project and open Xcode workspace • Show Xcode project file navigator • Show podfile • Add podfile to project (drag and drop, uncheck copy if needed, Ruby script) • Import statements in project source files
  • 20. NASA Images • go to https://api.nasa.gov/api.html#apod • show specifications for the endpoint • show example JSON returned (use browser) • show code for Alamofire GET request • show code using SwiftyJSON • show code for HUD • show code for Image Downloader
  • 21. Pod file examples • podfile and podfile.lock
  • 22. Best practices • Under source control: • podfile • podfile.lock • .xcworkspace • PODS directory - controversy • Pod install vs Pod update - be in control
  • 23. Alternatives to CocoaPods • Carthage • A decentralized dependency manager • Swift Package Manager • Only available in Mac OS and Linux apps
  • 24. Thanks! • Source code https://github.com/jcatalan007/cocoapods-talk • Slides https://www.slideshare.net/jcatalan007/manage- your-external-libraries-with-cocoapods