1

我想在我的项目中合并 2 个 pod。一个是:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'DJKFlipper'

另一个是:

platform :ios, '9.0'
pod 'HQPagerViewController', :git=> 'https://github.com/quangpc/HQPagerViewController.git', :branch=> 'master'

问题是一个要求平台 8.0 而另一个是 9.0

我尝试将整个文件平台更改为 8.0,但出现以下错误:Specs satisfying the HQPagerViewController (from https://github.com/quangpc/HQPagerViewController.git, branch master), HQPagerViewController (= 1.0) dependency were found, but they required a higher minimum deployment target.

如果将目标保持在 9.0,安装 pod 后我会在应用程序中遇到超过 100 个问题,因为目标平台不正确。

我也试过这个:

target 'Bhaskar' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks

 platform :ios, ‘9.0’
  use_frameworks!

  pod 'HQPagerViewController', :git=> 'https://github.com/quangpc/HQPagerViewController.git', :branch=> 'master'

end

target 'Bhaskar - FlipView’ do
  source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'DJKFlipper'
end

但这里也出现错误。我可能是第二次使用 Pod,并且总是使用相同的平台。我怎样才能将这两者结合起来?

任何帮助将不胜感激!谢谢!

4

2 回答 2

0

这是因为您的项目设置中的“部署目标”低于 9.0(这是 HQPagerViewController 要求的最低要求),因此您必须将其更改为 9.0。在此处输入图像描述

于 2017-07-09T16:48:04.880 回答
0

由于您对一个 pod 的最低要求为 ios 9,因此您的目标平台应该是 9。您可以更改部署目标,如上面 RJiryes 所述。由于您的 pod 之一是 base 8,因此在大多数情况下,它应该支持 ios 9 到。但是,如果您的 ios 8 pod 已弃用 ios 9 的代码,在这种情况下,您将不得不修改您的 pod 并将其更改为支持 ios9。并且使用最新版本的 pod 很重要,因为使用旧版本的 pod 不是好的做法,最终可能会出现问题。

于 2017-07-09T17:11:40.357 回答