成功pod install分享(本人在pod install失敗后,研究成功后的總結(jié))
安裝CocoaPods成功后,先不急著編寫(xiě)Podfile。按以下順序:
1、執(zhí)行:pod search AFNetworking,會(huì)提示
Setting up CocoaPods master repo
耐心等待后,提示
Setup completed
-> AFNetworking (2.5.0)
?? A delightful iOS and OS X networking framework.
?? pod 'AFNetworking', '~> 2.5.0'
?? - Homepage: https://github.com/AFNetworking/AFNetworking
?? - Source: ? https://github.com/AFNetworking/AFNetworking.git
?? - Versions: 2.5.0, 2.4.1, 2.4.0, 2.3.1, 2.3.0, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0,
?? 2.1.0, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 2.0.0-RC3, 2.0.0-RC2, 2.0.0-RC1, 1.3.4, 1.3.3,
?? 1.3.2, 1.3.1, 1.3.0, 1.2.1, 1.2.0, 1.1.0, 1.0.1, 1.0, 1.0RC3, 1.0RC2, 1.0RC1, 0.10.1,
?? 0.10.0, 0.9.2, 0.9.1, 0.9.0, 0.7.0, 0.5.1 [master repo]
?? - Sub specs:
?? ? - AFNetworking/Serialization (2.5.0)
?? ? - AFNetworking/Security (2.5.0)
?? ? - AFNetworking/Reachability (2.5.0)
?? ? - AFNetworking/NSURLConnection (2.5.0)
?? ? - AFNetworking/NSURLSession (2.5.0)
?? ? - AFNetworking/UIKit (2.5.0)
-> AFNetworking+AutoRetry (0.0.5)
?? Auto Retries for AFNetworking requests
?? pod 'AFNetworking+AutoRetry', '~> 0.0.5'
。。。(很長(zhǎng)省略)
注意到AFNetworking 版本已經(jīng)是2.5.0
2、創(chuàng)建Podfile
轉(zhuǎn)到項(xiàng)目根目錄,vi Podfile,輸入內(nèi)容(因?yàn)楸救私ǖ捻?xiàng)目為ios8.1版本):
platform :ios, '8.1'
pod 'AFNetworking', '~> 2.5.0'
保存。
3、執(zhí)行 pod install,稍等片刻
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.5.0)
Generating Pods project
Integrating client project
[!] From now on use `Swift Weather.xcworkspace`.
成功pod install。
2015-05-30
[!] Unable to find a specification for `AFNetworikng`
樓主報(bào)這個(gè)錯(cuò)啊。
2015-03-05
Analyzing dependencies
CocoaPods 0.36.0.rc.1 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies
Installing AFNetworking (2.5.1)
Generating Pods project
Integrating client project
[!] From now on use `Swift Weather.xcworkspace`.
我的是這個(gè)樣子的,謝謝樓主!
2015-01-18
樓主,為毛我等了好久還沒(méi)好,是不是網(wǎng)絡(luò)不行???
2015-01-07
謝謝分享
2014-12-16
多謝分享,用了淘寶的源之后大概幾十秒之后完成AFNetworking
2014-12-05
樓主第一步大約等了多久才安裝好呀?謝謝!
2014-11-28
多謝樓主分享~~~??? 問(wèn)題解決了~~