0

I have an Objective-C project.

  • Most of files are written in Objc
  • Several custom UIView classes are written in Swift.
  • Specially one of UIViewController subclass using Core-Plot is written in Objc.

It has no problem, until... Now, I am trying to create a new UIViewController using Core-Plot written in Swift.

Trying to use import CorePlot to import external framework Core-Plot as described here. But the compiler shows the error "No such module 'CorePlot'"

Here is my Podfile:

platform :ios, '8.0'

target 'Meters' do
  # use_frameworks!

  # Pods for Meters
  pod 'PQFCustomLoaders', '~> 1.1.0'
  pod 'CorePlot'
end
  • I have used pod install and 'pod update'
  • I tried "Clean and rebuild"

Neither works for me. Please let me know if any other information needed.

antonio081014
  • 3,553
  • 1
  • 30
  • 37
  • Does it mean I can't use the same external framework for two files, one written in Objc, the other written in Swift? – antonio081014 Oct 28 '16 at 00:06
  • http://stackoverflow.com/questions/29994331/no-such-module-restkit-with-cocoapods-and-swift ? Did you open .xcodeworkspace and no xcodeproj? – Larme Oct 28 '16 at 08:31

1 Answers1

1

You have to build pods as frameworks (uncomment use_frameworks! in the pod file) to create modules. Core Plot will work fine that way but I don't know about the other pod you're using.

Eric Skroch
  • 27,381
  • 3
  • 29
  • 36