在 iOS Objective C 中添加 Cloudinary Pod

Adding Cloudinary Pod in iOS Objective C

我正在使用 Cocoapods 安装第 3 方框架。我的项目在 Objective-C 代码中。我在 Cocoapods 中使用了大约 10 多个 Pod 框架。但是现在我无法在我的项目中安装 Cloudinary

这是我在 Podfile 中给出的内容:pod 'Cloudinary, (~> 2.0)'

我的应用程序的部署目标为 8.0。即使是 cloudinary 也有相同的最小部署目标。据我所知,Cloudinary 依赖于 Alamofire。即使我尝试使用新示例项目,它也不会安装。当我尝试安装时,它会抛出如下错误。

Cloudinary (~> 2.0) required by Podfile Specs satisfying Cloudinary (~> 2.0) dependency were found, but they required higher minimum deployment target"

我刚刚检查了部署目标依赖项。但它与我的项目相匹配。

有人遇到过这个问题吗?有什么解决办法吗?

//更新

更改为

后 Pod 更新的屏幕截图

platform :ios, '9.0'

Cloudinary 的 SDK (v2.0.1) 实际上目前支持 iOS 9+(至于写这些行),他们需要更新它(他们可以支持 iOS 8)。

如果您想继续支持 iOS 8,您有多种选择,对您而言最简单的方法是使用 Cloudinary 的 swift-2.3 分支,因为它支持 iOS 8:

pod 'Cloudinary', :git => 'https://github.com/cloudinary/cloudinary_ios.git', :branch => 'swift-2.3'

但是你必须记住在 Cloudinary 更新他们的 master 分支以支持 iOS 8 后更改它,因为这个分支是 swift-2.3 的临时支持分支并且可能不会获取任何更新。

您还可以从 Podfile 中删除 Cloudinary 并将 Cloudinary 添加为子模块,然后将其目标设置为 iOS 8.

终于找到Cloudinary没有安装CocoaPods的问题了。我的 Podfile 中有 QMServices (QuickBlox)。我希望这个框架与 use_frameworks! 兼容。 Cocoapods 不允许使用此 pod 安装 Cloudinary。

当我从 Podfile 中删除 QMServices 时,可以使用 iOS 9.0 正确安装 Cloudinary。

但是,我仍然不知道哪个特定的依赖项导致了 Cloudinary 和 QMServices 之间的问题。

希望对您有所帮助。