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
?
Then edit the Podfile file
?
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
?
At this point Alamofire was cocoapods installed.
If you want to change or add additional third-party class libraries. Direct
?
Add or remove the class library for the text, and then
?
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