Lets start installing the popular library Alamofire to our Xcode project!
Lets first install CocoaPods by using the command:
[sudo] gem install cocoapods
Then let's create a new project in Xcode called Start! Navigate to the folder that contains the .xcodeproj
and create a new text file called podfile
!
Replace the podfile
with the following:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target 'start' do
pod 'Alamofire', '~> 4.3'
end
Use the cd
command to change to the directory containing the .xcodeproj
and issue the command pod install
. Alamofire is installed in the project 'start'!
Now, double-click the xcworkspace file (not .xcodeproj) and use Alamofire!