安装好CocoaPods 环境后:
1、单独安装CocoaAsyncSocket
打开mac 终端,ls 查看当前目录文件,cd到当前工程目录,vim Podfile
按i切换到输入模式,输入内容:
platform :ios, ‘10.0’
target ‘你工程名’ do
use_frameworks! # Add this if you are targeting iOS 8+ or using Swift
pod ‘CocoaAsyncSocket’
end
按esc退出输入模式,按 :wq 保存退出
然后进行安装:
pod install
在工程任何地方import CocoaAsyncSocket即可使用
2、单独安装Kingfisher
打开mac 终端,ls 查看当前目录文件,cd到当前工程目录,vim Podfile
按i切换到输入模式,输入内容:
source ‘https://github.com/CocoaPods/Specs.git’
platform :ios, ‘10.0’
target ‘你工程名’ do
use_frameworks!
pod ‘Kingfisher’
end
按esc退出输入模式,按 :wq 保存退出
然后进行安装:
pod install
在工程任何地方import Kingfisher即可使用
3、同时安装CocoaAsyncSocket和Kingfisher,此时Podfile格式:
platform :ios, ‘版本’
target ‘你工程名’ do
第三方pod
end
打开mac 终端,ls 查看当前目录文件,cd到当前工程目录,vim Podfile
按i切换到输入模式,输入内容:
source ‘https://github.com/CocoaPods/Specs.git’
platform :ios, ‘10.0’
target ‘ECServiceCenter’ do
use_frameworks!
pod ‘CocoaAsyncSocket’
pod ‘Kingfisher’
end
按esc退出输入模式,按 :wq 保存退出
然后进行安装:
pod install