iOS 最新版 CocoaPods 的安裝流程 2016.5(轉)

來源:互聯網
上載者:User

標籤:

作者 奶瓶瓶??  http://www.cnblogs.com/zxs-19920314/p/4985476.html?utm_source=tuicool&utm_medium=referral

1.移除現有Ruby預設源

$gem sources --remove https://rubygems.org/ 2.使用新的源$gem sources -a https://ruby.taobao.org/   3.驗證新源是否替換成功$gem sources -l 4.安裝CocoaPods(1)$sudo gem install cocoapods 備忘:蘋果系統升級OS X EL Capitan後改為$sudo gem install -n /usr/local/bin cocoapods(2)$pod setup 5.更新gem$sudo gem update --system 6.建立工程,並在終端用cd指令到檔案夾內 $pod search 第三方 7.建立檔案 vim “Podfile”, $vim Podfile 寫入以下內容並儲存 小提示:(終端vim檔案 按 i 可編輯 ,esc 退出編輯,:wq  可儲存退出) platform:ios, ‘6.0‘   pod ‘AFNetworking‘, ‘~> 2.3.1‘    <-------第三方 8.匯入第三方庫$pod install 9.退出終端 以下是我用以前的安裝流程安裝時出現的一些錯誤終端  cocoapods 下載bug調試:錯誤1:Error fetching http://ruby.taobao.org/:
    bad response Not Found 404 (http://ruby.taobao.org/specs.4.8.gz)解決方案:把安裝流程中 $gem sources -a http://ruby.taobao.org/   ---改為---->$gem sources -a https://ruby.taobao.org/錯誤2:ERROR:  While executing gem ... (Errno::EPERM)    Operation not permitted - /usr/bin/pod 解決方案:蘋果系統升級OS X EL Capitan後會出現的外掛程式錯誤,將安裝流程 4.安裝CocoaPods 的 (1)sudo gem install cocoapods ——>改為sudo gem install -n /usr/local/bin cocoapods錯誤3:[!] Unable to satisfy the following requirements:

- `AVOSCloud (~> 3.1.6.3)` required by `Podfile`

Specs satisfying the `AVOSCloud (~> 3.1.6.3)` dependency were found, but they required a higher minimum deployment target.

解決方案:安裝流程:Podfile檔案 中   platform:ios, ‘6.0’  後邊的 6.0 是平台版本號碼 ,一定要加上

iOS 最新版 CocoaPods 的安裝流程 2016.5(轉)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.