0

I'm iOS beginner, so I'm sorry if this is an elementary mistake...

Hi, I'm developing iOS app by Swift, and trying to use CorePlot( https://github.com/core-plot/core-plot ) Library.

Using examples from this blog ( http://blog.alwold.com/2014/08/07/using-coreplot-with-swift-in-ios/ ), I tried following procedures.


  1. pod install CorePlot.
  2. make Bridging-Header file.
  3. import "CorePlot-CocoaTouch.h in Bridging-Header file.
  4. register Bridging-Header.h to app target Objective-C Bridging-Header.

But I got following error when running app.

Bridging-Header.h 'CorePlot-CocoaTouch.h' file not found.

Searching the file existence, I found CorePlot-CocoaTouch.h in Users/USER_NAME/Document/workspace/PROJECT_NAME/Pods/CorePlot/framework/CorePlot-CocoaTouch.h.

How can I deal with this?
If you need additional information, please tell me.

thanks.

Christophe
  • 68,716
  • 7
  • 72
  • 138
nsmkw
  • 1
  • 2

3 Answers3

2

Have you tried #import "CorePlot/CorePlot-CocoaTouch.h" ?

kas84
  • 21
  • 1
0

In the application build settings, make sure the header search paths include the framework directory.

Also, until Core Plot 2.0 is released, be sure to point your podfile at the "release-2.0" branch. It has several API changes to make Core Plot work with Swift

Eric Skroch
  • 27,381
  • 3
  • 29
  • 36
  • how to add coreplot 2.0 in briginging header – Ramkumar chintala Nov 02 '15 at 13:24
  • getting these error when im using coreplot 2.0 Failed to import bridging header '/Users/ramkumar/Desktop/LIVE_PROJECTS/Sample/Sample-Bridging-Header.h' – Ramkumar chintala Nov 03 '15 at 04:32
  • @Ramkumarchintala Ask a new question with details about your setup and the problem you're having. Adding comments to an old question is not helpful and doesn't give enough information for us to help you. – Eric Skroch Nov 03 '15 at 12:49
  • I dont have Permissions to post a question. i just add the pod file and install pods .open workspace and created Bridging header in that header #import "coreplot.h" and in my view controller import CorePlot . it gives errors in coreplot.h file "Cocoa/CoCoa.h" not found – Ramkumar chintala Nov 04 '15 at 04:08
  • @Ramkumarchintala Make sure your pod file specifies the correct platform. The Cocoa framework is available only on the Mac. – Eric Skroch Nov 05 '15 at 01:42
  • can u sand me the sample application(or) link coreplot 2.0 with swift xcode 7.1 – Ramkumar chintala Nov 05 '15 at 04:02
  • The example code is included in the release package and at https://github.com/core-plot/core-plot/tree/master/examples. – Eric Skroch Nov 05 '15 at 15:00
0

I had faced the similar issue with Xcode 10 beta 6. Problem is that part of the framework we have mac supported cocoa files which are not available for iOS. So we just need to remove them to make it work for iOS.

enter image description here

Saikiran Komirishetty
  • 6,525
  • 1
  • 29
  • 36