iOS CocoaPods - kgleong/software-engineering GitHub Wiki
Search for third party packages at https://cocoapods.org/.
- Add a
Podfile
to the root app directory- run
pod init
- run
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'MyApp' do
pod 'Alamofire', '~> 4.0'
pod 'AFNetworking', '~> 3.0'
pod 'MBProgressHUD', '~> 1.0.0'
pod 'SwiftLint'
end
- run
pod install
pod lib create <module name>
# Clears the Xcode project cache
rm -rf ~/Library/Developer/Xcode/DerivedData/
# Clears the pod cache
pod cache clean --all
Use the following convention when versioning: MAJOR.MINOR.PATCH
Position | Description |
---|---|
MAJOR |
incompatible API changes have been made. |
MINOR |
functionality has been added, and backwards-compatibility has been maintained |
PATCH |
backwards-compatible fixes have been incorporated |
- Make changes
- Update version in
.podspec
file. - Run
pod lib lint
to run the linter on the local changes. - Commit changes and tag commit with
git tag <version>
- Push tag and commit to remote:
git push origin master
git push origin --tags
- Run
pod spec lint <Pod name>.podspec
to validate the Pod's configuration - Push to CocoaPods:
pod trunk push <Pod name>.podspec