下載和安裝cocoaPods,下載安裝cocoaPods

來源:互聯網
上載者:User

下載和安裝cocoaPods,下載安裝cocoaPods

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

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.