How to install the Alamofire 4.0 in Xcode 8.0

2019-02-11 09:39发布

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

3条回答
霸刀☆藐视天下
2楼-- · 2019-02-11 10:04

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 Finally write pod install

For complete reference please refer Alamofire

查看更多
Fickle 薄情
3楼-- · 2019-02-11 10:04

try this:

pod 'Alamofire', :git => 'https://github.com/Homely/Alamofire.git', :branch => 'ios8'
查看更多
可以哭但决不认输i
4楼-- · 2019-02-11 10:14

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...!)

查看更多
登录 后发表回答