【问题标题】:Coreplot throws error when downloaded with cocoapods-1.0.1使用 cocoapods-1.0.1 下载 Coreplot 时抛出错误
【发布时间】:2016-09-13 13:53:53
【问题描述】:

我正在尝试使用 Cocoapods 1.0.1 下载 coreplot,但它一直抛出错误 'CorePlot/CorePlot-CocoaTouch.h' file not found 我尝试了网上给出的各种解决方案,但对我没有任何效果。请帮我解决这个问题。

这是我的podfile 代码示例

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '7.0'

xcodeproj 'Sample'

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


target 'SampleKIFTests', :exclusive => true do
  pod 'KIF', '~> 3.3.0'
  pod 'KIF/IdentifierTests', '~> 3.3.0'
end

【问题讨论】:

标签: ios swift cocoapods core-plot podfile


【解决方案1】:

在构建为静态库时使用此行包含标题:

#import "CorePlot-CocoaTouch.h"

或者构建框架时的这个:

#import <CorePlot/CorePlot.h>

【讨论】:

  • 我尝试在 Bridging-Header 中添加它。它不起作用。除了更改这些行之外,我还应该做些什么吗?试过#import &lt;CorePlot/CorePlot.h&gt;#import "CorePlot-CocoaTouch.h"#import &lt;CorePlot/CorePlot-CocoaTouch.h&gt;
  • 我尝试下载最新版本的 Coreplot 和相同的导入语句。还是不行
  • 我认为您不应该向桥接头添加任何内容。尝试将其添加到YourProject-Swift.h
  • 桥接头是在 Swift 项目中包含 Core Plot 标头的正确位置(这就是 Core Plot 示例应用程序所做的)。确保标题搜索路径包括包含 Core Plot 源的 Pods 文件夹。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-03-30
  • 2021-10-10
  • 2022-12-23
  • 2021-01-18
  • 2017-02-22
  • 1970-01-01
相关资源
最近更新 更多