Practical Cocoapods
-
Upload
michele-titolo -
Category
Technology
-
view
447 -
download
0
description
Transcript of Practical Cocoapods
![Page 1: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/1.jpg)
Practical Cocoapods@MicheleTitolo
![Page 2: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/2.jpg)
![Page 3: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/3.jpg)
Objective-C Library Dependency Manager
![Page 4: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/4.jpg)
Specify Dependencies
![Page 5: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/5.jpg)
Specify Versions
![Page 6: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/6.jpg)
Dependency Resolution
![Page 7: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/7.jpg)
![Page 8: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/8.jpg)
Private Pods
![Page 9: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/9.jpg)
Yes, this is a thing
![Page 10: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/10.jpg)
Theory
![Page 11: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/11.jpg)
You can add a .podspecto anything
![Page 12: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/12.jpg)
Any remote can be a pod
![Page 13: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/13.jpg)
2 options
![Page 14: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/14.jpg)
Your own Spec repo
![Page 15: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/15.jpg)
└── [SPEC_NAME] └── [VERSION] └── [SPEC_NAME].podspec
![Page 16: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/16.jpg)
$ pod repo add NAME SOURCE_URL$ cd ~/.cocoapods/NAME$ pod repo lint .
![Page 17: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/17.jpg)
Don’t need a private fork of CocoaPods/Specs
![Page 18: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/18.jpg)
Any code, anywhere
![Page 19: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/19.jpg)
Specify any remotethat has a .podspec
![Page 20: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/20.jpg)
pod ‘BananaLib’, :git=>[email protected]/…
![Page 21: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/21.jpg)
Podspecs should be in the root folder of the repository
![Page 22: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/22.jpg)
Specify a .podspec
![Page 23: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/23.jpg)
pod ‘BananaLib’, :podspec => ‘https://…’
![Page 24: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/24.jpg)
Specify a path
![Page 25: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/25.jpg)
pod ‘BananaLib’, :path => ‘~/Projects/…’
![Page 26: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/26.jpg)
Modular Code
![Page 27: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/27.jpg)
Smaller dependencies
![Page 28: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/28.jpg)
Independent pieces
![Page 29: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/29.jpg)
Decouple
![Page 30: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/30.jpg)
![Page 31: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/31.jpg)
More dependencies
![Page 32: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/32.jpg)
“Dependencies are bad!”
![Page 33: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/33.jpg)
![Page 34: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/34.jpg)
Choosing dependencies
![Page 35: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/35.jpg)
![Page 36: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/36.jpg)
Commits
![Page 37: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/37.jpg)
Stars, Watchers, and Forks
![Page 38: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/38.jpg)
Open : Closed Issues
![Page 39: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/39.jpg)
Pull Requests
![Page 40: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/40.jpg)
Look at the code
![Page 41: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/41.jpg)
In Summary
![Page 42: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/42.jpg)
![Page 43: Practical Cocoapods](https://reader036.fdocuments.in/reader036/viewer/2022062512/554a56c3b4c9054b328b4bc0/html5/thumbnails/43.jpg)
Thank You@MicheleTitolo