0
votes

I am trying to follow this tutorial (Using-core-plot-in-an-iphone-application). When I try to drag the CorePlot-CocoaTouch.xcodeproj file from the core-plot/framework directory into my project, I don't have anything appear that allows me to put the library into my xcode project. Is it my version compared to the tutorials verison? Can anyone tell me how I would do this with a version of xcode 4.3.3? Thanks

2
Rather than following that older tutorial, I'd recommend using the up-to-date installation instructions on the Core Plot wiki: code.google.com/p/core-plot/wiki/UsingCorePlotInApplications . Of course, I wrote those, so I'm a little biased. I do know they work with the latest version of Xcode, because I've used them recently. - Brad Larson

2 Answers

0
votes

Try using the instructions at the beginning of this tutorial, its what worked for me and I just set up CorePlot last week.

http://www.johnwordsworth.com/2011/10/adding-charts-to-your-iphone-ipad-app-using-core-plot/

Additionally you don't want to drag the .xcodeproj file, there are a different set of files that you want that are noted at the beginning of the above tutorial.

0
votes

Drag the CorePlot-CocoaTouch.xcodeproj file to your project

Go to the Build Phases section of the settings for your current target.

Expand the target Dependencies section, hit the + button and there should be an option for CorePlot-CocoaTouch, add it.

Expand the Link Binary With Library Section, hit +, choose libCorePlot-CocoaTouch.a

Go to build settings, and under header search paths add the appropriate path, I use "${PROJECT_DIR}/../core-plot/Source/framework"

got to other linker flags and add -ObjC

The next 2 instructions are not required for getting your app to build, but are needed to get it to build an archive for the App Store.

Now go to the filebrowser for your project, choose the core-plot project, choose the CorePlot-CococaTouch target, in the settings search for Skip Install and set it to yes

Go to Build Phases, expand the Copy Headers section, move all of the headers to the project section.