【发布时间】:2017-02-03 06:50:34
【问题描述】:
我需要将一个项目升级到 Swift 3.0,其中包含一些由 Cocodpods 提供的库。
因此,我删除了与 Cocoapods 相关的所有链接,并使用 pod init 重新创建 pod 文件并升级了某些版本的库,例如 AlamorFire。
但是 pod install 说
[!] Unable to satisfy the following requirements:
- `Alamofire (~> 4.0)` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Alamofire (~> 4.0)`.
You have either:
* out-of-date source repos which you can update with `pod repo update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
我已将部署 Target 更新为 9.0 并使用 cocoapod 1.1.0
为了测试,我创建了新项目并只添加了 Alamofire,但结果是一样的。
如果你有一些经验,请帮助我。
【问题讨论】:
-
你试过运行
pod repo update吗? -
是的,我已经更新了。
-
pod repo 更新时,错误是由损坏的存储库发生的。我已经删除了主仓库并再次设置了 pod。之后,效果很好。谢谢。
标签: cocoapods alamofire xcode8