IOS Charts Module compiled with swift 3.0 cannot be imported in Swift 2.3

616 views Asked by At

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

There are 2 answers

6
Tj3n On BEST ANSWER

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

3
Mitesh jadav On

You can need to change version of pod in pod file

OR

use following github demo and install pod

https://github.com/i-schuetz/SwiftCharts