SlideShare a Scribd company logo
CocoaPods
CocoaPods
CocoaPods
• iOS
•
•
•
• gem sources —remove https://rubygems.org/
• gem sources -a https://ruby.taobao.org
• sudo gem install cocoapods
• pod init
• pod search AFNetworking
• `pod "AFNetworking", "~> 2.0” ` Podfile
• pod update / pod update AFNetworking
• *.workspace
• podspec
• pod spec create your_library_name
• specs.git
podfile.lock
•
•
Podfile
• pod 'AFNetworking', '~> 2.5.1’ # pod update <2.6
• pod 'Nimbus/AttributedLabel', '~> 1.2.0’ # subpodspec
• pod ‘AFNetworking’, :git=>”http://github.com/xxx”, commit=“a_sha1_hash”
• pod ‘AFNetworking’, :git=>”http://github.com/xxx”, branch=>“dev”
• pod ‘AFNetworking’, :git=>”http://github.com/xxx”, tag=>“1.6”
• pod ‘AFNetworking’, :path=>”~/Documents/AFNetworking” # datamanager
• pod update / pod install
• http://guides.cocoapods.org/using/the-podfile.html
post_install
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
if target.name == "Pods-EMToday-AFNetworking"
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$
(inherited)', 'AF_APP_EXTENSIONS=1']
end
end
end
end
Specifying pod versions
Besides no version, or a specific one, it is also possible to use logical operators:
• '> 0.1' Any version higher than 0.1
• '>= 0.1' Version 0.1 and any higher version
• '< 0.1' Any version lower than 0.1
• '<= 0.1' Version 0.1 and any lower version
In addition to the logic operators CocoaPods has an optimistic operator ~>:
• '~> 0.1.2' Version 0.1.2 and the versions up to 0.2, not including 0.2 and
higher
• '~> 0.1' Version 0.1 and the versions up to 1.0, not including 1.0 and higher
• '~> 0' Version 0 and higher, this is basically the same as not having it.

More Related Content

What's hot

Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Software, Inc.
 
Ansible basics workshop
Ansible basics workshopAnsible basics workshop
Ansible basics workshopDavid Karban
 
Building web framework with Rack
Building web framework with RackBuilding web framework with Rack
Building web framework with Racksickill
 
WebSocket - Nov 2011
WebSocket - Nov 2011WebSocket - Nov 2011
WebSocket - Nov 2011takanao ENODH
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Software, Inc.
 
Ansible Meetup Hamburg / Quickstart
Ansible Meetup Hamburg / QuickstartAnsible Meetup Hamburg / Quickstart
Ansible Meetup Hamburg / QuickstartHenry Stamerjohann
 
RUNDECK PRO - example acl policy convention
RUNDECK PRO -  example acl policy conventionRUNDECK PRO -  example acl policy convention
RUNDECK PRO - example acl policy conventionsimplifyops
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them AllTim Fairweather
 
SELF 2011: Deploying Django Application Stacks with Chef
SELF 2011: Deploying Django Application Stacks with ChefSELF 2011: Deploying Django Application Stacks with Chef
SELF 2011: Deploying Django Application Stacks with ChefChef Software, Inc.
 
Real world Django deployment using Chef
Real world Django deployment using ChefReal world Django deployment using Chef
Real world Django deployment using Chefcoderanger
 
Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)Cameron Eagans
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to AnsibleCédric Delgehier
 
WebSocketサーバを使ってみよう! Jul 2011
WebSocketサーバを使ってみよう! Jul 2011WebSocketサーバを使ってみよう! Jul 2011
WebSocketサーバを使ってみよう! Jul 2011takanao ENODH
 

What's hot (20)

Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
 
Chef training - Day2
Chef training - Day2Chef training - Day2
Chef training - Day2
 
Ansible basics workshop
Ansible basics workshopAnsible basics workshop
Ansible basics workshop
 
Building web framework with Rack
Building web framework with RackBuilding web framework with Rack
Building web framework with Rack
 
WebSocket - Nov 2011
WebSocket - Nov 2011WebSocket - Nov 2011
WebSocket - Nov 2011
 
Ansible Crash Course
Ansible Crash CourseAnsible Crash Course
Ansible Crash Course
 
CocoaPods
CocoaPodsCocoaPods
CocoaPods
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
Chef training Day5
Chef training Day5Chef training Day5
Chef training Day5
 
Ansible101
Ansible101Ansible101
Ansible101
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation Setup
 
Ansible Meetup Hamburg / Quickstart
Ansible Meetup Hamburg / QuickstartAnsible Meetup Hamburg / Quickstart
Ansible Meetup Hamburg / Quickstart
 
RUNDECK PRO - example acl policy convention
RUNDECK PRO -  example acl policy conventionRUNDECK PRO -  example acl policy convention
RUNDECK PRO - example acl policy convention
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them All
 
SELF 2011: Deploying Django Application Stacks with Chef
SELF 2011: Deploying Django Application Stacks with ChefSELF 2011: Deploying Django Application Stacks with Chef
SELF 2011: Deploying Django Application Stacks with Chef
 
Chef training - Day3
Chef training - Day3Chef training - Day3
Chef training - Day3
 
Real world Django deployment using Chef
Real world Django deployment using ChefReal world Django deployment using Chef
Real world Django deployment using Chef
 
Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)Open Atrium (DrupalCon Paris 2009, Day 3)
Open Atrium (DrupalCon Paris 2009, Day 3)
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
WebSocketサーバを使ってみよう! Jul 2011
WebSocketサーバを使ってみよう! Jul 2011WebSocketサーバを使ってみよう! Jul 2011
WebSocketサーバを使ってみよう! Jul 2011
 

Viewers also liked

Why My Horse Doesnt Smile
Why My Horse Doesnt SmileWhy My Horse Doesnt Smile
Why My Horse Doesnt SmileNeelesh Kapoor
 
Crisp about motivation
Crisp about motivationCrisp about motivation
Crisp about motivationNaveen Safare
 
Why My Horse Doesnt Listen
Why My Horse Doesnt ListenWhy My Horse Doesnt Listen
Why My Horse Doesnt ListenVivek Mehrotra
 
A case study on motivation
A case study on motivationA case study on motivation
A case study on motivationAmitava Sengupta
 
Presentation On Motivation
Presentation On MotivationPresentation On Motivation
Presentation On Motivationguesta3562
 
Theories of Motivation
Theories of MotivationTheories of Motivation
Theories of Motivationmasumi kadali
 

Viewers also liked (7)

Why My Horse Doesnt Smile
Why My Horse Doesnt SmileWhy My Horse Doesnt Smile
Why My Horse Doesnt Smile
 
Crisp about motivation
Crisp about motivationCrisp about motivation
Crisp about motivation
 
Motivation
MotivationMotivation
Motivation
 
Why My Horse Doesnt Listen
Why My Horse Doesnt ListenWhy My Horse Doesnt Listen
Why My Horse Doesnt Listen
 
A case study on motivation
A case study on motivationA case study on motivation
A case study on motivation
 
Presentation On Motivation
Presentation On MotivationPresentation On Motivation
Presentation On Motivation
 
Theories of Motivation
Theories of MotivationTheories of Motivation
Theories of Motivation
 

Similar to CocoaPods Basic Usage

Денис Лебедев-Управление зависимостями с помощью CocoaPods
Денис Лебедев-Управление зависимостями с помощью CocoaPodsДенис Лебедев-Управление зависимостями с помощью CocoaPods
Денис Лебедев-Управление зависимостями с помощью CocoaPodsUA Mobile
 
Cocoapods in action
Cocoapods in actionCocoapods in action
Cocoapods in actionHan Qin
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chefLeanDog
 
CocoaHeads Rennes #13 : CocoaPods
CocoaHeads Rennes #13 : CocoaPodsCocoaHeads Rennes #13 : CocoaPods
CocoaHeads Rennes #13 : CocoaPodsCocoaHeadsRNS
 
Velocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopVelocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopChef Software, Inc.
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeWO Community
 
Rhodes mobile Framework
Rhodes mobile FrameworkRhodes mobile Framework
Rhodes mobile FrameworkYoshi Sakai
 
Kubeflow Development Environment
Kubeflow Development EnvironmentKubeflow Development Environment
Kubeflow Development EnvironmentWeiqiang Zhuang
 
iOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake DubliniOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake Dublinroland99
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9JBUG London
 
Giving back with GitHub - Putting the Open Source back in iOS
Giving back with GitHub - Putting the Open Source back in iOSGiving back with GitHub - Putting the Open Source back in iOS
Giving back with GitHub - Putting the Open Source back in iOSMadhava Jay
 
State of search | drupalcamp ghent
State of search | drupalcamp ghentState of search | drupalcamp ghent
State of search | drupalcamp ghentJoris Vercammen
 
Cocoa pods iOSDevUK 14 talk: managing your libraries
Cocoa pods iOSDevUK 14 talk: managing your librariesCocoa pods iOSDevUK 14 talk: managing your libraries
Cocoa pods iOSDevUK 14 talk: managing your librariesDiego Freniche Brito
 
Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureKasun Kodagoda
 

Similar to CocoaPods Basic Usage (20)

Денис Лебедев-Управление зависимостями с помощью CocoaPods
Денис Лебедев-Управление зависимостями с помощью CocoaPodsДенис Лебедев-Управление зависимостями с помощью CocoaPods
Денис Лебедев-Управление зависимостями с помощью CocoaPods
 
Cocoapods in action
Cocoapods in actionCocoapods in action
Cocoapods in action
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chef
 
CocoaHeads Rennes #13 : CocoaPods
CocoaHeads Rennes #13 : CocoaPodsCocoaHeads Rennes #13 : CocoaPods
CocoaHeads Rennes #13 : CocoaPods
 
Velocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopVelocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack Workshop
 
CocoaPods.pptx
CocoaPods.pptxCocoaPods.pptx
CocoaPods.pptx
 
Deploying to Ubuntu on Linode
Deploying to Ubuntu on LinodeDeploying to Ubuntu on Linode
Deploying to Ubuntu on Linode
 
Rhodes mobile Framework
Rhodes mobile FrameworkRhodes mobile Framework
Rhodes mobile Framework
 
Kubeflow Development Environment
Kubeflow Development EnvironmentKubeflow Development Environment
Kubeflow Development Environment
 
Mastering composer
Mastering composerMastering composer
Mastering composer
 
iOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake DubliniOS and Android Acceptance Testing with Calabash - Xcake Dublin
iOS and Android Acceptance Testing with Calabash - Xcake Dublin
 
SydJS.com
SydJS.comSydJS.com
SydJS.com
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
 
Giving back with GitHub - Putting the Open Source back in iOS
Giving back with GitHub - Putting the Open Source back in iOSGiving back with GitHub - Putting the Open Source back in iOS
Giving back with GitHub - Putting the Open Source back in iOS
 
State of search | drupalcamp ghent
State of search | drupalcamp ghentState of search | drupalcamp ghent
State of search | drupalcamp ghent
 
Cocoa pods iOSDevUK 14 talk: managing your libraries
Cocoa pods iOSDevUK 14 talk: managing your librariesCocoa pods iOSDevUK 14 talk: managing your libraries
Cocoa pods iOSDevUK 14 talk: managing your libraries
 
nodecalgary1
nodecalgary1nodecalgary1
nodecalgary1
 
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
 
Using GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to AzureUsing GitHub Actions to Deploy your Workloads to Azure
Using GitHub Actions to Deploy your Workloads to Azure
 
For mobile 3/14'
For mobile 3/14'For mobile 3/14'
For mobile 3/14'
 

Recently uploaded

CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Electivekarthi keyan
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwoodseandesed
 
Antenna efficency lecture course chapter 3.pdf
Antenna  efficency lecture course chapter 3.pdfAntenna  efficency lecture course chapter 3.pdf
Antenna efficency lecture course chapter 3.pdfAbrahamGadissa
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdfKamal Acharya
 
fundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionfundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionjeevanprasad8
 
Explosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdfExplosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdf884710SadaqatAli
 
Danfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdfDanfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdfNurvisNavarroSanchez
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdfKamal Acharya
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptssuser9bd3ba
 
Scaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageScaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageRCC Institute of Information Technology
 
fluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerfluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerapareshmondalnita
 
shape functions of 1D and 2 D rectangular elements.pptx
shape functions of 1D and 2 D rectangular elements.pptxshape functions of 1D and 2 D rectangular elements.pptx
shape functions of 1D and 2 D rectangular elements.pptxVishalDeshpande27
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234AafreenAbuthahir2
 
Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxwendy cai
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfPipe Restoration Solutions
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
 
Toll tax management system project report..pdf
Toll tax management system project report..pdfToll tax management system project report..pdf
Toll tax management system project report..pdfKamal Acharya
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdfKamal Acharya
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxMd. Shahidul Islam Prodhan
 

Recently uploaded (20)

CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Antenna efficency lecture course chapter 3.pdf
Antenna  efficency lecture course chapter 3.pdfAntenna  efficency lecture course chapter 3.pdf
Antenna efficency lecture course chapter 3.pdf
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 
fundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionfundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projection
 
Explosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdfExplosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdf
 
Danfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdfDanfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdf
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Scaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageScaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltage
 
fluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerfluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answer
 
shape functions of 1D and 2 D rectangular elements.pptx
shape functions of 1D and 2 D rectangular elements.pptxshape functions of 1D and 2 D rectangular elements.pptx
shape functions of 1D and 2 D rectangular elements.pptx
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Toll tax management system project report..pdf
Toll tax management system project report..pdfToll tax management system project report..pdf
Toll tax management system project report..pdf
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdf
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
 

CocoaPods Basic Usage

  • 3. • gem sources —remove https://rubygems.org/ • gem sources -a https://ruby.taobao.org • sudo gem install cocoapods
  • 4. • pod init • pod search AFNetworking • `pod "AFNetworking", "~> 2.0” ` Podfile • pod update / pod update AFNetworking • *.workspace
  • 5. • podspec • pod spec create your_library_name • specs.git
  • 7. Podfile • pod 'AFNetworking', '~> 2.5.1’ # pod update <2.6 • pod 'Nimbus/AttributedLabel', '~> 1.2.0’ # subpodspec • pod ‘AFNetworking’, :git=>”http://github.com/xxx”, commit=“a_sha1_hash” • pod ‘AFNetworking’, :git=>”http://github.com/xxx”, branch=>“dev” • pod ‘AFNetworking’, :git=>”http://github.com/xxx”, tag=>“1.6” • pod ‘AFNetworking’, :path=>”~/Documents/AFNetworking” # datamanager • pod update / pod install • http://guides.cocoapods.org/using/the-podfile.html
  • 8. post_install post_install do |installer_representation| installer_representation.project.targets.each do |target| if target.name == "Pods-EMToday-AFNetworking" target.build_configurations.each do |config| config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$ (inherited)', 'AF_APP_EXTENSIONS=1'] end end end end
  • 9. Specifying pod versions Besides no version, or a specific one, it is also possible to use logical operators: • '> 0.1' Any version higher than 0.1 • '>= 0.1' Version 0.1 and any higher version • '< 0.1' Any version lower than 0.1 • '<= 0.1' Version 0.1 and any lower version In addition to the logic operators CocoaPods has an optimistic operator ~>: • '~> 0.1.2' Version 0.1.2 and the versions up to 0.2, not including 0.2 and higher • '~> 0.1' Version 0.1 and the versions up to 1.0, not including 1.0 and higher • '~> 0' Version 0 and higher, this is basically the same as not having it.