- Commands
$ sudo gem install cocoapods # Install CocoaPods
$ cd desktop # Change directory
$ pod init # Create a new file named Podfile automatically
$ vim Podfile # Edit Podfile vi/vim
$ pod install # Install dependencies
$ open MyApp.xcworkspace # Open MyApp.xcworkspace
$ pod update # Update dependencies
Podfile
platform :ios, '10.0'
target 'MyApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'Alamofire', '~> 5.2'
end
CocoaPods is a dependency manager for Cocoa projects.
-
Cartfile
github "Alamofire/Alamofire" ~> 5.2
Carthage is a decentralized dependency manager.
Package.swift
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.2.0"))
]