通过 cocoapod 安装 CorePlot 2.0 失败

Failed to install CorePlot 2.0 via cocoapod

我一直在我的 Xcode 项目中使用 cocoapod 使用 CorePlot 1.5.1,没有问题。现在我需要升级到 CorePlot 2.0,因为我需要在同一事件上触摸 up/down。我尝试通过以下任一方式编辑 PodFile 来做到这一点:

pod 'CorePlot', '~> 2.0'

target 'ERPTests' do
pod 'CorePlot'
end

第一种方式我得到错误“CorePlot (~> 2.0) required by Podfile”。第二种方式我得到了 1.5.1 版本。我的 cocoa pod 是 0.35.0。我用谷歌搜索并没有找到与此问题相关的 post。有什么想法吗?

Core Plot 还没有 2.0 版本(还)。在您的 podfile 中使用以下行指向 release-2.0 分支:

pod 'CorePlot', :git => 'https://github.com/core-plot/core-plot.git', :branch => 'release-2.0'

有一个合并的 header 文件适用于 Mac 和 iOS 应用程序。您还可以将 CorePlot-CocoaTouch.h header 用于 iOS 个项目。

#import "CorePlot.h"