CocoadPods 安装中遇到的一些问题

来源:互联网 发布:深圳网络外包公司 编辑:程序博客网 时间:2024/06/16 07:40

在Pod install  的时候遇到的一些问题抓狂抓狂,下面例如:pod 'AFNetworking', '~> 3.1.0'  

1、[!] The dependency `AFNetworking (=3.1.0)` is not used in any concrete target.

解决方案大笑出现这个错误是由于CocoaPods的版本较高,在高版中需要添加target;

为了避免这种情况的出现,我们在创建Podfile文件的时候,

  • 不要使用$vim Podfile命令创建,使用它创建是空白文档;在高版本中需要手动配置;
  • 使用$pod init命令创建,在Podfile文件中,会自动出现下面代码;

# Uncomment this line to define a global platform for your project# platform :ios, '9.0'target 'MNTabbarDemo' do  # Uncomment this line if you're using Swift or would like to use dynamic frameworks  # use_frameworks!  # Pods for MNTabbarDemo  target 'MNTabbarDemoTests' do    inherit! :search_paths    # Pods for testing  end  target 'MNTabbarDemoUITests' do    inherit! :search_paths    # Pods for testing  endend




1 0
原创粉丝点击