Search code examples
chartscocoapodsswift3ios10xcode8

Which Pod we need to use in Swift 3 for implementing chart in iOS?


I need to add a LineChart in my application.We can use Cocoapods. I have added : pod 'Charts' in Podfile for implementing Chart in my iOS application.While opening the workspace xcode asked for convert the project in to swift 3. But after that it shows so many errors(because of the language conversion from swift 2.3 to 3).

These are the steps that i have followed.

Added pod 'Charts' in Podfile, installed it then opened the workspace Added the link binary Charts.framework in the Build phases of project target Imported the Charts in ViewController

From github i got a solution for swift 3 pod 'SwiftCharts', :git => 'https://github.com/i-schuetz/SwiftCharts.git'

but in my case this also not working i couldn't even create an IBOutlet for my View(USed in viewcontroller for displaying the chart).


Solution

  • You may be use this pod for swift 3.0

    use_frameworks!
    pod 'SwiftCharts', :git => 'https://github.com/i-schuetz/SwiftCharts.git'