| |

Installing Core Plot in a Mac Application

I’ve started using the Core Plot framework in one of my Mac apps, and I had a few problems setting it up, which, looking through some posts on the web, other users have had as well. Since it took a while for me to track down the exact solution to my problem, I’m posting in here in the hope that it’ll save some other users the time I spent on it.

Firstly, a word or two about Core Plot. The framework in a data visualisation (aka graphing) solution created by primarily by Drew McCormack, with input for several other people. Basically, it lets you create line, bar and pie charts in a cocoa app with minimal effort.

I’d previously used Core Plot in a couple of iPhone & iPad apps, and managed to install it without any problems. However, when installing it in my Mac app by following the instructions on the website (http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications) I was met with a string of compiler errors related to Core Plot classes.

After checking my installation and making sure that search paths, etc., were all set to point to the Core Plot folder, it became apparently that something else was amiss. Searching through a number of posts on the web and the Core Plot site, and poking though a couple of Apple documents, it became apparent that one vital step missing from the docs was to set the build folder in the CorePlot.xcodeproj to match the build folder of the actual project containing it. This is done by double clicking on the CorePlot.xcodeproj project item embedded in your project, then selecting ‘Get Info’ from the project item’s contextual menu. This will display the Project Info window. Select the ‘Build’ tab. In the ‘Build Products Path’, set the location of the parent project’s build folder.

CorePlotLocation.png CorePlotContextualMenu.png

CorePlotBuildSettings.png

Hopefully, the information here will save someone else a bit of time setting up Core Plot.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *