SlideShare a Scribd company logo
1 of 33
Download to read offline
CocoaPods
Hai Feng Kao

CocoaHead Taipei 2016.10
iOS Tech Challenge 2015.09
iOS Tech Challenge 2015.09
iOS
iOS iOS iOS iOS Firmware
MERGE!!! xcodeproj
MERGE!!! xib
MERGE!!! storyboard
2016 Hack NTU 2016.08
2016 Hack NTU 2016.08
iOS iOS
iOS
iOS
iOS
iOS iOS
Ruby
Development Pods!
sudo gem install cocoapods
Let CocoaPods manage files
• Don’t use xcodeproj

• Use xcworkspace instead

• don’t commit xcworkspace

• put it in .gitignore

• Put files in development pods

• New files will be added to xcworkspace

• run pod install when files are added or removed

• don’t have to run pod install for file editing

• Regenerate xcworkspace after each pull

• by running pod install again
•
• enable demo application
Create new project
Ignore xcworkspace
Ignore Pods
Add new files
• Put sources in HelloWorld/Classes
• Arrange the code structure
• Different folder for different iOS dev
• Or any way you like
Create xcworkspace
• run pod install
Images!
enable bundles
• uncomment resource_bundles

• in HelloWorld.podspec

• include all files in Assets

• storyboard

• xib

• jpg

• png
Add PodAsset
• We need it to locate bundles

• https://github.com/
haifengkao/PodAsset
Show appreciation
• Press 

• https://github.com/
haifengkao/PodAsset
Add images
• to HelloWorld/Assets
Show images
• locate the bundle with
PodAsset

• use imageNamed:inBundle:
Other resources
• You can use the same method
to load

• json

• storyboard

• xib

• Check readme

• https://github.com/
haifengkao/PodAsset

• Send you pull requests!
Clean git repository
• No more merges!!!!!
Summary
• Avoid merge xcodeproj
• put files in Classes folder
• Avoid merge xib and storyboard
• each dev maintains his own storyboard files
• put resources in Assets folder
Q&A
• You can mix swift and objc in the same pod
• The pod is local (development pod)
• you don’t have to publish it to the Internet
• This method didn’t cover test case management
• yes, you still need to merge xcodeproj if you add new
test cases
• There are other options: use frameworks instead of pods
Thank You

More Related Content

What's hot

Taking Spinnaker for a spin @ London DevOps Meetup 36
Taking Spinnaker for a spin @ London DevOps Meetup 36Taking Spinnaker for a spin @ London DevOps Meetup 36
Taking Spinnaker for a spin @ London DevOps Meetup 36aleonhardt
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerJames Turnbull
 
Docker.key
Docker.keyDocker.key
Docker.keyjwausle
 
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...PAPIs.io
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the Worlddamovsky
 
Containerization using docker
Containerization using dockerContainerization using docker
Containerization using dockerWingChan46
 
Sandbox CI/CD Environments for Everyone [BADCamp 2018]
Sandbox CI/CD Environments for Everyone [BADCamp 2018]Sandbox CI/CD Environments for Everyone [BADCamp 2018]
Sandbox CI/CD Environments for Everyone [BADCamp 2018]Leonid Makarov
 

What's hot (8)

Taking Spinnaker for a spin @ London DevOps Meetup 36
Taking Spinnaker for a spin @ London DevOps Meetup 36Taking Spinnaker for a spin @ London DevOps Meetup 36
Taking Spinnaker for a spin @ London DevOps Meetup 36
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker.key
Docker.keyDocker.key
Docker.key
 
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...Building machine learning applications locally with Spark — Joel Pinho Lucas ...
Building machine learning applications locally with Spark — Joel Pinho Lucas ...
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
Containerization using docker
Containerization using dockerContainerization using docker
Containerization using docker
 
Sandbox CI/CD Environments for Everyone [BADCamp 2018]
Sandbox CI/CD Environments for Everyone [BADCamp 2018]Sandbox CI/CD Environments for Everyone [BADCamp 2018]
Sandbox CI/CD Environments for Everyone [BADCamp 2018]
 

Viewers also liked

Reactive Cocoa && MVVM
Reactive Cocoa && MVVMReactive Cocoa && MVVM
Reactive Cocoa && MVVMHai Feng Kao
 
Reactive cocoa 101
Reactive cocoa 101Reactive cocoa 101
Reactive cocoa 101Hai Feng Kao
 
不能說的Dependency injection
不能說的Dependency injection不能說的Dependency injection
不能說的Dependency injectionHai Feng Kao
 
Reactive Cocoa Unknown Frontier
Reactive Cocoa Unknown FrontierReactive Cocoa Unknown Frontier
Reactive Cocoa Unknown FrontierHai Feng Kao
 
Reactive Cocoa Operators
Reactive Cocoa OperatorsReactive Cocoa Operators
Reactive Cocoa OperatorsHai Feng Kao
 
105-2 iOS程式設計(四)
105-2 iOS程式設計(四)105-2 iOS程式設計(四)
105-2 iOS程式設計(四)Hao Lee
 

Viewers also liked (6)

Reactive Cocoa && MVVM
Reactive Cocoa && MVVMReactive Cocoa && MVVM
Reactive Cocoa && MVVM
 
Reactive cocoa 101
Reactive cocoa 101Reactive cocoa 101
Reactive cocoa 101
 
不能說的Dependency injection
不能說的Dependency injection不能說的Dependency injection
不能說的Dependency injection
 
Reactive Cocoa Unknown Frontier
Reactive Cocoa Unknown FrontierReactive Cocoa Unknown Frontier
Reactive Cocoa Unknown Frontier
 
Reactive Cocoa Operators
Reactive Cocoa OperatorsReactive Cocoa Operators
Reactive Cocoa Operators
 
105-2 iOS程式設計(四)
105-2 iOS程式設計(四)105-2 iOS程式設計(四)
105-2 iOS程式設計(四)
 

Similar to CocoaPods Guide for Managing iOS Project Files

Manage your external libraries with CocoaPods
Manage your external libraries with CocoaPodsManage your external libraries with CocoaPods
Manage your external libraries with CocoaPodsJuan C Catalan
 
CocoaPods introduction
CocoaPods introductionCocoaPods introduction
CocoaPods introductionJordi Giménez
 
Cocoa tip for Cocoaheads Shanghai February 2016
Cocoa tip for Cocoaheads Shanghai February 2016Cocoa tip for Cocoaheads Shanghai February 2016
Cocoa tip for Cocoaheads Shanghai February 2016Antoine Cœur
 
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
 
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 iOSPrajwal S Prakash
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy VirinCocoaHeads France
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPodsCocoaHeads France
 
Google Map Implementation with offline feature.
Google Map Implementation with offline feature.Google Map Implementation with offline feature.
Google Map Implementation with offline feature.Jayanta Sinhamahapatra
 
Create Your First Cocoa pods
Create Your First Cocoa podsCreate Your First Cocoa pods
Create Your First Cocoa podsPawan Ramteke
 
Kinect Workshop Part 1/2
Kinect Workshop Part 1/2Kinect Workshop Part 1/2
Kinect Workshop Part 1/2Seiya Konno
 
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 ServiceJosh Padnick
 
Library, Library Lets Use THAT Library – DFW Mobile
Library, Library Lets Use THAT Library  – DFW MobileLibrary, Library Lets Use THAT Library  – DFW Mobile
Library, Library Lets Use THAT Library – DFW MobileAdam Hill
 
Shipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOSShipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOSRoss Kukulinski
 

Similar to CocoaPods Guide for Managing iOS Project Files (20)

Manage your external libraries with CocoaPods
Manage your external libraries with CocoaPodsManage your external libraries with CocoaPods
Manage your external libraries with CocoaPods
 
CocoaPods introduction
CocoaPods introductionCocoaPods introduction
CocoaPods introduction
 
Cocoa tip for Cocoaheads Shanghai February 2016
Cocoa tip for Cocoaheads Shanghai February 2016Cocoa tip for Cocoaheads Shanghai February 2016
Cocoa tip for Cocoaheads Shanghai February 2016
 
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?
 
Agile sites2
Agile sites2Agile sites2
Agile sites2
 
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
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
 
CocoaPods.pptx
CocoaPods.pptxCocoaPods.pptx
CocoaPods.pptx
 
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
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPods
 
Google Map Implementation with offline feature.
Google Map Implementation with offline feature.Google Map Implementation with offline feature.
Google Map Implementation with offline feature.
 
Using Cocoapods
Using CocoapodsUsing Cocoapods
Using Cocoapods
 
Create Your First Cocoa pods
Create Your First Cocoa podsCreate Your First Cocoa pods
Create Your First Cocoa pods
 
For mobile 3/14'
For mobile 3/14'For mobile 3/14'
For mobile 3/14'
 
Kinect Workshop Part 1/2
Kinect Workshop Part 1/2Kinect Workshop Part 1/2
Kinect Workshop Part 1/2
 
Ionic
IonicIonic
Ionic
 
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
 
Library, Library Lets Use THAT Library – DFW Mobile
Library, Library Lets Use THAT Library  – DFW MobileLibrary, Library Lets Use THAT Library  – DFW Mobile
Library, Library Lets Use THAT Library – DFW Mobile
 
Shipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOSShipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOS
 
Creating Cocoapods Library
Creating Cocoapods LibraryCreating Cocoapods Library
Creating Cocoapods Library
 

Recently uploaded

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

CocoaPods Guide for Managing iOS Project Files