【发布时间】:2015-10-14 20:52:42
【问题描述】:
我正在尝试将 Realm 与 Swift 2.0 一起使用 我的 Podfile 很简单:
source 'https://github.com/CocoaPods/Specs.git'
pod 'AWSS3', '~> 2.2.0'
# Realm Frameworks
use_frameworks!
pod 'RealmSwift', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'swift-2.0'
但我得到了
[!] Unable to satisfy the following requirements:
- `RealmSwift (from `https://github.com/realm/realm-cocoa.git`, branch `swift-2.0`)` required by `Podfile`
在我看来,Podfile 的格式很好。如有任何帮助,我将不胜感激。
【问题讨论】:
-
你在其他项目中使用过 Realm 框架吗?我以前遇到过这个问题(使用另一个 Pod),原来是我尝试使用的 Pod,而不是我的 Podfile。
-
我刚试了你的 Podfile,它安装没有问题。除了您发布的内容之外,Podfile 中还有其他内容吗?
-
@joem 没有。就是这样。我发布的唯一错误是 'source 'github.com/CocoaPods/Specs.git'' 行应该是代码格式。
-
@joem 我将 cocoapods 更新到了最新版本,并得到了更有用的信息。 “已找到满足
RealmSwift (fromgithub.com/realm/realm-cocoa.git, branchswift-2.0)依赖项的规范,但它们需要更高的最小部署目标。”然后我将目标升级到 iOS9 并安装了它。