Top Top Top!! Xcode7.1 use Cocoapods to install the third-party network library under Alamofire--swift

Source: Internet
Author: User

Xcode7.1 use Cocoapods to install the third-party network library under Alamofire--swift

The alamofire previously searched online was version 1.3. So the installation to Xcode7.1 will be error, so the Alamofire3.1 version with Cocoapods installation. Convenient for everyone to use.

Alamofire Swift afnetworking Network Framework CocoaPods

As a result of the previous online search Alamofire is version 1.3. So the installation to Xcode7.1 will be error, so the Alamofire3.1 version with Cocoapods installation. Convenient for everyone to use. This article is suitable for novice cocoapods.

In the directory where the CD project is located, create the Podfile file with the Cocoapods already installed

?
1 touch Podfile

Then edit the Podfile file

?
1 open -e Podfile

In the open podfile text editor, enter

?
12345 source ‘https://github.com/CocoaPods/Specs.git‘platform :ios‘8.0‘use_frameworks!pod ‘Alamofire‘‘~> 3.0‘

After saving

?
1 pod install

At this point Alamofire was cocoapods installed.

If you want to change or add additional third-party class libraries. Direct

?
1 open -e Podfile

Add or remove the class library for the text, and then

?
1 pod update

Note: If the installation is successful, open the. xcworkspace file.

If the header files of the third-party libraries that are installed cannot be introduced. You need to change targets--->build Settings-->user Header Search Paths Add ${srcroot}

Top Top Top!! Xcode7.1 use Cocoapods to install the third-party network library under Alamofire--swift

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.