How to install the Alamofire 4.0 in Xcode 8.0

和自甴很熟 提交于 2019-11-30 16:24:33

问题


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


回答1:


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




回答2:


try this:

pod 'Alamofire', :git => 'https://github.com/Homely/Alamofire.git', :branch => 'ios8'



回答3:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!