ios中一些三方的库用的cocoaPods管理。管理三方库非常的方便

简单说一下安装步骤

1、sudo gem install cocoapods
2、gem sources –remove https://rubygems.org/(在墙外了,所以得按照不走三来)
3、gem sources -a https://ruby.taobao.org/
4、gem sources -l(如果打印*******Current sources**** https://ruby.taobao.org/ 说明命令执行成功

开始安装

5、sudo gem install cocoapods(会提示你输入密码但是光标不移动)

(等一段时间)

6、cd 到自己工程目录

7、touch Podfile(创建Podfile)

8、vim Podfile(编辑命令)按i(开始编辑)

输入:

platform:ios,’7.0′
pod ‘XXX’,’~>0.1.1′

9、esc shift :wq 退出

10、pod install

ps:VKVideoPlayer demo会出现问题,大多数是Podfile文件里的配置有问题

这是改好了的,可以参考一下

platform :ios, ‘5.1.1’
pod ‘DTCoreText’, ‘~> 1.6.11’
pod ‘AFNetworking’, ‘1.3.3’
pod “VKVideoPlayer”, “~> 0.1.1”
pod ‘CocoaLumberjack’, ‘~> 1.7.0’
pod ‘VKFoundation’, ‘0.1.1’
pod ‘CocoaHTTPServer’

target ‘VKVideoPlayerTests’ do
pod ‘Specta’, ‘~> 0.2.1’
pod ‘Expecta’, ‘~> 0.3.0’
pod ‘OCMock’, ‘~> 2.2.1’
pod “VKVideoPlayer”, “~> 0.1.1”
pod ‘CocoaHTTPServer’
end

# Remove 64-bit build architecture from Pods targets
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |configuration|
target.build_settings(configuration.name)[‘ARCHS’] = ‘$(ARCHS_STANDARD_32_BIT)’
end
end
end