【发布时间】:2015-07-28 19:55:31
【问题描述】:
我在项目的依赖管理方面遇到了一些困难。我目前已经成功地让 Alamofire 工作,现在我希望在我的项目中添加一个新的依赖项。
按照此处的指南 - https://github.com/SwiftyJSON/SwiftyJSON 它告诉我将以下内容添加到我的 pod 文件中
platform :ios, '8.0'
use_frameworks!
target 'Relocate' do
pod 'SwiftyJSON', '~> 2.2.1'
end
这意味着我的 pod 文件现在如下所示;
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 1.3'
platform :ios, '8.0'
use_frameworks!
target 'Relocate' do
pod 'SwiftyJSON', '~> 2.2.1'
end
问题是,当我运行pod install 命令时,出现以下错误
Rickis-iMac:Relocate rickilambert$ pod install
Updating local specs repositories
Analyzing dependencies
[!] Unable to satisfy the following requirements:
- `SwiftyJSON (~> 2.2.1)` required by `Podfile`
有谁知道我该如何解决这个问题?
谢谢
【问题讨论】:
标签: swift cocoapods dependency-management swifty-json