ShinobiCharts - Use of undeclared type/identifier


#1

Sorry to plague everyone with a newbie question. Running Shinobi for iOS. Trying out the GettingStarted demo. It works stand alone but if I import the code into a project (with suitable changes) and test it I get masses of “Use of undeclared type/identifier” style errors. I have the full suite and have +ed all the Shinobi Frameworks into the Build Phases (they appear as briefcases). Any ideas?

class CalculationsShinobiTest: UIViewController, SChartDatasource{ <- Use of undeclared type "SChartDatasource"
 
 
 let chart = ShinobiChart(frame: CGRectInset(view.bounds, margin, margin)) <- Use of undeclared identifier "SChartDatasource"

#2

Remove


#3

Hi ehasted,

This sounds like you need to set up a bridging header.

You can use the supplied bridging header bundled with the framework - you should be able to follow along with the quickstart guide which can be found here or included within your download.

Alternatively, if you add an empty objective-c class, Xcode will ask you if you want to create a bridging header. Then within the file, add  import <ShinobiCharts/ShinobiCharts.h>.  Xcode will update the Bridging header build settings for you to point at this header.

I hope that helps,

Sam