在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
end
end