Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CocoaPods - A better way to use and publish ope...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Francis Chong
March 29, 2014
Programming
380
2
Share
CocoaPods - A better way to use and publish open source project for Objective-C
At Hong Kong Open Source Conference 2014
Francis Chong
March 29, 2014
More Decks by Francis Chong
See All by Francis Chong
Migrate to Swift 3
siuying
0
210
Implement beautiful DSL for iOS using Ruby
siuying
2
800
Legco OpenData
siuying
0
140
EverClip - Evernote DEVCUP Meetup 2013 Hong Kong
siuying
0
98
iOS Development with Ruby using RubyMotion
siuying
1
190
Other Decks in Programming
See All in Programming
Making the RBS Parser Faster
soutaro
0
710
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
180
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
460
AIを導入する前にやるべきこと
negima
2
350
Spec-Driven Development with AI Agents (Workshop, May 2026)
antonarhipov
3
340
継続的な負荷検証を目指して
pyama86
3
1.1k
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
200
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.8k
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
200
PHPer、Cloudflare に引っ越す
suguruooki
1
180
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
5.2k
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Crafting Experiences
bethany
1
140
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
150
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
330
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
420
Evolving SEO for Evolving Search Engines
ryanjones
0
190
Transcript
CocoaPods A better way to use and publish open source
project for Objective-C
Francis Chong @siuying
Cocoa
A cocoa pod http://en.wikipedia.org/wiki/Cocoa_bean
cocoapods.org “CocoaPods is the dependency manager for Objective-C projects.”
Dependency Manager
dependency?
System Frameworks
Reusable Components
Third Party Code
Manage Dependency, the old way
“Drag the *.h and *.m file to Xcode”
None
Static Library
Frameworks
None
“dependency hell”
A -> C (version 1) B -> C (version 2)
A -> C (version 1) B -> C (version 2)
C -> D (version 3) E -> D (version 4) F -> B (version 5)
Better way to manage dependency?
rubygems pip npm
CocoaPods Basic
Installation
sudo gem install cocoapods
pod setup
Project Setup
cd MyApp! pod init
Podfile
None
“The Podfile is a specification that describes the dependencies of
the targets of one or more Xcode projects.” cocoapods.org
DSL for dependencies
None
None
None
None
None
Podspecs
“A Podspec, or Spec, describes a version of a Pod
library.” cocoapods.org
None
None
None
None
Repo
“The Specs Repo is git repository that contains the list
of available pods.” cocoapods.org
None
“Every library has an individual folder, which contains sub folders
of the available versions of that pod. ”
None
Install Dependencies
pod install
None
What happened when you run pod install ?
Update Podspecs Repo
Resolve Dependency
None
Semantic Versioning http://semver.org/
1.6.4 MAJOR.MINOR.PATCH
MAJOR - incompatible API changes
MINOR - add functionality in a backwards-compatible manner
PATCH - backwards- compatible bug fixes.
1.6.4 MAJOR.MINOR.PATCH
Download Dependencies
git hg svn bzr http
Generate Pods project
Generate workspace
None
Advance Topics
Making a CocoaPod
pod spec create MyLibrary
MyLibrary.podspec
None
pod lib create MyLibrary
!"" Assets! !"" Classes! #"" ios! #"" osx! !"" Resources!
!"" Example! #"" Podfile! !"" CHANGELOG.md! !"" LICENSE! !"" README.md! #"" MyLibrary.podspec!
MyLibrary.podspec
README.md CHANGELOG.md LICENSE
Example/Podfile
None
Release Pod
None
Publish your pod to public Repo
Fork the CocoaPods/ Specs repo
.! !"" Specs! #"" [SPEC_NAME]! #"" [VERSION]! #"" [SPEC_NAME].podspec
.! !"" MyLibrary! #"" 0.1.0! #"" MyLibrary.podspec! #"" 0.2.0! #""
MyLibrary.podspec
Send a Pull Request
Your Private Pods
Specify your own Podspec
None
None
Create Your Repo
.! !"" Specs! #"" [SPEC_NAME]! #"" [VERSION]! #"" [SPEC_NAME].podspec
pod repo add REPO_NAME SOURCE_URL!
CocoaPods Today
0.29.0
4227 Pods 12372 Versions
Most merged pull request #2 http://octoverse.github.com/
CocoaPods Bug Bash http://blog.cocoapods.org/CocoaPods-Bug-Bash/
Learn from CocoaPods
Automation
Use existing infrastructure and tools
Build a MVP
Embrace opensource
Francis Chong @siuying
Readings • CocoaPods Guide • Semantic Versioning • iOS Static
Libraries Are, Like, Really Bad, And Stuff • kstenerud/iOS-Universal-Framework