3

How do I install the Core Plot framework into Xcode 4?

This older tutorial has instructions on how to install it for Xcode 3, but I could not find any similar instructions for Xcode 4. What do I need to do in order to use this framework with the newer Xcode?

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
M Holod
  • 255
  • 4
  • 11

2 Answers2

9

I made one here that followed what I did:

http://recycled-parts.blogspot.com/2011/07/setting-up-coreplot-in-xcode-4.html

Hope it helps!

mondousage
  • 483
  • 1
  • 5
  • 14
  • I will also mention, the code for that site is for the old version. Check down in the thread for posts on the new code. It will help a lot in your struggles. – mondousage Aug 05 '11 at 20:17
  • `http://recycled-parts.blogspot.com/` This blog is open to invited readers only... – lucasart Jan 01 '14 at 09:27
  • 1
    I'm sorry. The blog has been switched to public, thank you for notifying me. – mondousage Jan 02 '14 at 20:08
3

It appears that I was unable to set up core plot project for the reason that I had corrupt example project which code I was using.

This are the steps:

  • open a project
  • add quartzcore framework
  • add other linker flags: -ObjC -all_load
  • add CorePlot.xcodeproj to existing project (drag and drop)
  • add sample class (from examples folder, drag and drop)
  • drag coreplot framework from added CorePlot.xcodeproj to linked frameworks

in IB

  • drop object and associate it to sample class
  • drop custom view to window and associate it vith CPTLayerHostingView
  • connect object and custom view

And hat is that (may sound complicated, but can be done in under a minute)

Steps can be taken in any order, except last few.

Everithing is very similar to instructions at: http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application except the way it is done in xcode4 is actually easier.

Here are screenshoots that clarify the above steps: http://www.optimae.biz/data/stackoverflow/coreplot.pdf

Hope this will help someone.


M Holod
  • 255
  • 4
  • 11