【问题标题】:Cocoapods: no such module 'CorePlot'Cocoapods:没有这样的模块'CorePlot'
【发布时间】:2016-10-27 23:59:29
【问题描述】:

我有一个 Objective-C 项目。

  • 大部分文件都是用 Objc 编写的
  • 几个自定义 UIView 类是用 Swift 编写的。
  • 特别是使用 Core-Plot 的 UIViewController 子类之一是用 Objc 编写的。

没问题,直到... 现在,我正在尝试使用用 Swift 编写的 Core-Plot 创建一个新的UIViewController

尝试使用import CorePlot 导入外部框架Core-Plot,如here 所述。但是编译器显示错误“没有这样的模块'CorePlot'”

这是我的 Podfile:

platform :ios, '8.0'

target 'Meters' do
  # use_frameworks!

  # Pods for Meters
  pod 'PQFCustomLoaders', '~> 1.1.0'
  pod 'CorePlot'
end
  • 我使用过pod install 和“pod update”
  • 我尝试了“清理并重建”

都不适合我。如果需要任何其他信息,请告诉我。

【问题讨论】:

  • 这是否意味着我不能对两个文件使用相同的外部框架,一个用 Objc 编写,另一个用 Swift 编写?
  • stackoverflow.com/questions/29994331/… ?你打开了 .xcodeworkspace 而没有 xcodeproj 吗?

标签: ios objective-c swift cocoapods


【解决方案1】:

您必须将 pod 构建为框架(取消注释 pod 文件中的 use_frameworks!)才能创建模块。 Core Plot 可以正常工作,但我不知道您正在使用的另一个 pod。

【讨论】:

    猜你喜欢
    • 2015-12-04
    • 1970-01-01
    • 1970-01-01
    • 2023-02-16
    • 1970-01-01
    • 2015-09-12
    • 1970-01-01
    • 1970-01-01
    • 2021-03-20
    相关资源
    最近更新 更多