You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read numerous issues on how to install but am failing pretty badly.
I have a pure objective-c project and am using CocoaPods. I believe this is a very common scenario.
So first thing I do is look at "CocoaPods Install" of the README and add it into my Podfile:
platform :ios, '9.0'
pod 'Charts'
use_frameworks!
Do a pod install and everything works.
I even am able to create a view and use Module 'Chart' and BarChartView as the class. And it compiles and I see "No chart data available" in orange.
However now I am trying to add a reference to that chart but I can't figure out what to import. I've tried to import lots of different things but none of it is resolving. What do I do in this case?
The text was updated successfully, but these errors were encountered:
What was confusing to me is that when I saw "@import" it looked kinda like Swift syntax/code so I ignored it thinking I had to do something like #import <Charts/Charts.h> or something like that. When in fact "@import Charts" is a perfectly valid statement and will compile (is it converting it to objective-c in the background or is that actually valid? Like is the preprocessor converting it).
It's perfectly valid ObjC, since iOS 8 where Apple have introduced Modules.
Instead of #includeing specific headers and looking at the docs to figure out which- you can @import a module.
This also layed the ground for Swift's import and is the reason that you don't worry about .h files in Swift.
I have read numerous issues on how to install but am failing pretty badly.
I have a pure objective-c project and am using CocoaPods. I believe this is a very common scenario.
So first thing I do is look at "CocoaPods Install" of the README and add it into my Podfile:
Do a pod install and everything works.
I even am able to create a view and use Module 'Chart' and BarChartView as the class. And it compiles and I see "No chart data available" in orange.
However now I am trying to add a reference to that chart but I can't figure out what to import. I've tried to import lots of different things but none of it is resolving. What do I do in this case?
The text was updated successfully, but these errors were encountered: