使用cocoapod中出现The dependency `AFNetworking` is not used in any concrete target的问题

用到cocoapods安装第三方库的时候遇到了很多的问题,其中有一个The dependency `第三方库名称` is not used in any concrete target,它的意思是这个库不属于任何target

解决方法:修改Podfile  如下

# Uncomment this line to define a global platform for your project

# platform :ios, '9.0'

 

target 'unitTestDemo' do

  # Uncomment this line if you're using Swift or would like to use dynamic frameworks

  # use_frameworks!

 pod 'AFNetworking', '~> 2.5.0'

pod 'STAlertView', '~> 1.0.0'

  # Pods for unitTestDemo

 

  target 'unitTestDemoTests' do

    inherit! :search_paths

    # Pods for testing

  end

 

  target 'unitTestDemoUITests' do

    inherit! :search_paths

    # Pods for testing

  end

 

end

~                                                                               

"Podfile" 21L, 495C

 

pod install

 

现在不需要touch Podfile 创建Podfile 直接使用pod init,即可出现上面的内容

 

posted on 2016-09-12 18:32  envyhappy  阅读(466)  评论(0编辑  收藏  举报