Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CocoaPods - A better way to use and publish ope...
Search
Francis Chong
March 29, 2014
Programming
390
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
220
Implement beautiful DSL for iOS using Ruby
siuying
2
820
Legco OpenData
siuying
0
140
EverClip - Evernote DEVCUP Meetup 2013 Hong Kong
siuying
0
110
iOS Development with Ruby using RubyMotion
siuying
1
210
Other Decks in Programming
See All in Programming
iOSDC2026登壇資料.pdf
riofujimon
0
170
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2k
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
170
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.4k
新卒PdEのリアル
ryu1013
1
500
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
150
App Intentsのビルドプロセスを支える技術
kntkymt
0
390
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
310
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
340
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
730
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
290
Intent as Code
shoppingjaws
6
1k
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
700
WCS-LA-2024
lcolladotor
0
830
Unsuck your backbone
ammeep
672
58k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Between Models and Reality
mayunak
4
460
Music & Morning Musume
bryan
48
7.4k
Documentation Writing (for coders)
carmenintech
77
5.5k
Become a Pro
speakerdeck
PRO
31
6.3k
ラッコキーワード サービス紹介資料
rakko
1
4.9M
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
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