I am using the updated Xcode 8.0. How to install the alamofire 4.0 using cocoa pods. i am tried this one https://github.com/Alamofire/Alamofire. am getting an error when i convert the swift
Just follow these easy step >>>>>
1 Open Terminal and Type gem install cocoapods
2 Create Xcode project and set directory of project in terminal and and write pod init
3 A pod file will created, open it and write this -
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'Alamofire', '~> 4.0'
end
4 Save init file cmd+S
5 Finally write pod install
For complete reference please refer Alamofire
try this:
pod 'Alamofire', :git => 'https://github.com/Homely/Alamofire.git', :branch => 'ios8'
Follow the steps to install a pod:
1) Open the terminal.
2) Type pod
3) You should be able to see usage and commands...
if ( this is not the case ) {
Type: gem install cocoapods
Follow from Step 4:
} else {
Follow from Step 4:
}
4) Navigate to the directory of the project in terminal.
5) Now type: pod init
This will generate the pod file in your project directory with the respect to your project configuration...If you have enabled the tests,
UITests...then the pod file will look differently.
6) You need to find these lines:
target 'your project name will come here by default' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for <your project name will come here by default>
//Add the below line:
pod 'Alamofire', '~> 4.0'<br>
7) Now Type: pod install
That's it!!!(pod will get installed and you can use the methods you want...!)
来源:https://stackoverflow.com/questions/39636385/how-to-install-the-alamofire-4-0-in-xcode-8-0