CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target 解决办法

时间:2023-03-09 03:21:22
CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target 解决办法

产生这个问题的原因是最新版本的CocoaPods把Podfile文件的书写格式改变了,官网推荐用如下格式书写:

platform :ios, '8.0'
use_frameworks! target 'MyAppName' do
pod 'AFNetworking', '~> 2.6'
pod 'ORStackView', '~> 3.0'
pod 'SwiftyJSON', '~> 2.3'
end

其中把MyAppName换成工程名,最后使用

pod install --verbose --no-repo-update