前几天电脑重装了系统,CocoaPods报错!
[!] The dependency `SDWebImage` is not used in any concrete target.
The dependency `Reachability` is not used in any concrete target.
The dependency `JSONModel` is not used in any concrete target.
The dependency `MBProgressHUD` is not used in any concrete target.
The dependency `Masonry` is not used in any concrete target.
The dependency `HexColors` is not used in any concrete target.
The dependency `AFNetworking (~> 3.1.0)` is not used in any concrete target.
The dependency `SVProgressHUD` is not used in any concrete target.
The dependency `FastAnimationWithPOP` is not used in any concrete target.
The dependency `CocoaSecurity` is not used in any concrete target.
The dependency `Toast` is not used in any concrete target.
The dependency `JSPatch (~> 1.0)` is not used in any concrete target.
The dependency `WebViewJavascriptBridge (~> 4.1.4)` is not used in any concrete target.
The dependency `NJKWebViewProgress` is not used in any concrete target.
The dependency `MJRefresh` is not used in any concrete target.
The dependency `MJExtension` is not used in any concrete target.
The dependency `UMengAnalyticsSDK` is not used in any concrete target.
The dependency `UMengFeedbackSDK` is not used in any concrete target.
The dependency `Bugtags` is not used in any concrete target.
The dependency `YYKit` is not used in any concrete target.
The dependency `CocoaLumberjack` is not used in any concrete target.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:164:in `validate_podfile!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:62:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:227:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:151:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:150:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:114:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command/update.rb:60:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.1/bin/pod:55:in `
' /usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `
'
sudo gem install cocoapods --pre
安装cocoapods的预览版本,就会更新下来新的1.0.1版本,如下所示:
Successfully installed cocoapods-1.0.1
Parsing documentation for cocoapods-1.0.1
更新了新的版本,出错如下:
Updating local specs repositories Analyzing dependencies
[!] The dependency `SDWebImage` is not used in any concrete target.
The dependency `Reachability` is not used in any concrete target.
The dependency `JSONModel` is not used in any concrete target.
The dependency `MBProgressHUD` is not used in any concrete target.
The dependency `Masonry` is not used in any concrete target.
The dependency `HexColors` is not used in any concrete target.
The dependency `AFNetworking (~> 3.1.0)` is not used in any concrete target.
The dependency `SVProgressHUD` is not used in any concrete target.
The dependency `FastAnimationWithPOP` is not used in any concrete target.
The dependency `CocoaSecurity` is not used in any concrete target.
The dependency `Toast` is not used in any concrete target.
The dependency `JSPatch (~> 1.0)` is not used in any concrete target.
The dependency `WebViewJavascriptBridge (~> 4.1.4)` is not used in any concrete target.
The dependency `NJKWebViewProgress` is not used in any concrete target.
The dependency `MJRefresh` is not used in any concrete target.
The dependency `MJExtension` is not used in any concrete target.
The dependency `UMengAnalyticsSDK` is not used in any concrete target.
The dependency `UMengFeedbackSDK` is not used in any concrete target.
The dependency `Bugtags` is not used in any concrete target.
The dependency `YYKit` is not used in any concrete target.
The dependency `CocoaLumberjack` is not used in any concrete target.
官网是这样给推荐的:
在创建Podfile的时候,用这种格式使用,
platform :ios, '8.0'
#use_frameworks!个别需要用到它,比如reactiveCocoa
target 'MyApp' do
pod 'AFNetworking', '~> 2.6'
pod 'ORStackView', '~> 3.0'
pod 'SwiftyJSON', '~> 2.3'
end
下面是另外一种写法,
platform :ios, '8.0'
#use_frameworks!个别需要用到它,比如reactiveCocoa
def pods
pod 'AFNetworking', '~> 2.6'
pod 'ORStackView', '~> 3.0'
pod 'SwiftyJSON', '~> 2.3'
end
target 'MyApp' do
pods
end