I'm working on a project which is coded in swift 2.3 and I'm trying to use IOS charts (by danielgindi))in a new UIViewController.When I try to import Charts I get the following error saying "Module compiled with swift 3.0 cannot be imported in Swift 2.3". How can I overcome this issue and implement IOS Charts in Swift 2.3. My requirement is to use a pie chart to display data.
2 Answers
Use a lower version of it that is written in swift 2.3
Something like this in your podfile: pod 'Charts', '2.3.1', v2.3.1 support swift 2.3, v3.0+ seems to support swift 3
6 Comments
danu
I'm sorry I'm new ti swift, so u saying installing pod 'Charts', '2.3.1' would solve my issue ?
Tj3n
Are u using cocoapod? just replace
pod 'Charts' with the one above then reinstall, it should workdanu
No I'm not using pods for now. I just drag and dropped the library as in the tutorial. So what would u suggest sir ?
danu
this is the exact one i downloaded
|
You can need to change version of pod in pod file
OR
use following github demo and install pod
3 Comments
danu
I installed pod 'SwiftCharts', '~> 0.4' as it suggests, but same issue even after a clean build
Mitesh jadav
danu
yes swift 2.3 and I'm looking a way to use IOS Charts