# => - current # =* - current && default # * - default
使用 cocoapod 会出现:
1 2 3 4 5 6 7
/Users/lz/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'cocoapods' (>= 0) among 22 total gem(s) (Gem::LoadError) Checked in 'GEM_PATH=/Users/lz/.rvm/gems/ruby-2.0.0-p643:/Users/lz/.rvm/gems/ruby-2.0.0-p643@global', execute `gem env` for more information from /Users/lz/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:324:in `to_spec' from /Users/lz/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:64:in `gem' from /usr/local/bin/pod:22:in `<main>' from /Users/lz/.rvm/gems/ruby-2.0.0-p643@global/bin/ruby_executable_hooks:15:in `eval' from /Users/lz/.rvm/gems/ruby-2.0.0-p643@global/bin/ruby_executable_hooks:15:in `<main>'
pod 'AFNetworking', '~> 3.x' pod 'Masonry', '~> 0.6.2' pod 'FMDB' pod 'MJRefresh' pod 'SDWebImage' pod 'BaiduMapKit' pod 'EaseMobSDK', '~> 2.1.9' pod 'SDAutoLayout', '~> 1.31'
但是当你输入:
1
pod install
会出现以下错误:
1 2 3 4 5
Analyzing dependencies [!] The dependency `AFNetworking` is not used in any concrete target.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future,you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
因为 cocoapod 更新到 1.0.1 后,Podfile 格式发生了变化:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
platform :ios, ‘7.0’
target '你的项目名称'do
pod 'UMengAnalytics','~>3.6.6' pod 'AFNetworking', '~> 3.x' pod 'Masonry', '~> 0.6.2' pod 'FMDB' pod 'MJRefresh' pod 'SDWebImage' pod 'BaiduMapKit' pod 'EaseMobSDK', '~> 2.1.9' pod 'SDAutoLayout', '~> 1.31' pod 'NimbusKit-AttributedLabel', '~> 1.0.0'