ios - 依赖项 `AFNetworking (~> 2.5)` 未在任何具体目标中使用

标签 ios xcode git afnetworking cocoapods

我想安装 AFNetworking 但遇到问题,如何修复和安装?我用了Getting Started with AFNetworking :

1.下载 CocoaPods

sudo gem install cocoapods
pod setup

2.a.创建 Pod 文件

touch Podfile
open -a Xcode Podfile

2.b.然后复制粘贴:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'AFNetworking', '~> 2.5'

最佳答案

添加:

target 'MyApp' do
  pod 'AFNetworking', '~> 2.5'
end

参见:https://guides.cocoapods.org/using/the-podfile.html

然后从项目目录运行pod install

关于ios - 依赖项 `AFNetworking (~> 2.5)` 未在任何具体目标中使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37464977/

相关文章:

git - 将子目录分离(移动)到单独的 Git 存储库中

ios - 在许多 View Controller 上使用委托(delegate)和协议(protocol)快速更改主题

ios - 如何在 iOS 中启用 ARC 的项目中包含非 ARC 框架

ios - 检查 MonoTouch 中 iOS 类(而不是方法)的可用性

xcode - 如何使用#pragma clang 诊断

Visual Studio 代码中的 Git 表示即使没有更改文件也会被修改

ios - 从远程数据库填充 UITableView 单元格

ios - XCode 工作区完整性错误

xcode - swift代码中的产品版本号

git - 如何创建 git pre hook 来检测 'TODO' 或提交中的任何特定字符串?