Charts: How to run in Xcode 9 (beta)

Created on 14 Jun 2017  路  9Comments  路  Source: danielgindi/Charts

I have the target iOS version for my project set-up to iOS 9.0.

But I cannot build it with the charts (installed using CocoaPods), it gives errors, but thought I read somewhere it should be compatible with former Swift versions.

Most helpful comment

my 'Charts' target already set to 3.2 Swift Compiler to 3.2 initially. Then i select the 'Pods' project, select the 'Charts' target and there I set the Swift Compiler to 4.0. Build again and errors gone.
Im using xcode 9.2

All 9 comments

+1

I am not sure. Have you change to swift 3.0 compatibility in xcode 9? I can build and run the ChartsDemo without any changes.

What's the proper way of doing this? Never used the compatibility mode before.

In Xcode 9 build settings,
image
But I am not sure if this is the cause. Honestly I just compile and run without any errors except warnings.
You should post your error messages, not just saying "it gives errors"

Yes, that was the solution!
When selecting the 'Pods' project, select the 'Charts' target and there I set the Swift Compiler to 3.2. Now the errors are gone.

my 'Charts' target already set to 3.2 Swift Compiler to 3.2 initially. Then i select the 'Pods' project, select the 'Charts' target and there I set the Swift Compiler to 4.0. Build again and errors gone.
Im using xcode 9.2

@liuxuan30 Please help. When i add this pod, my project not compoling. I change the Swift version to 3.2, clean, recompile, nothing. I try Swift 3.2, crean, recompile, nothing. I'm using XCode 9.2 targeting iOS 11.0. Help please !

@wonder2011 add to your pod file
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| if ['Charts'].include? target.name config.build_settings['SWIFT_VERSION'] = '4.0' end end end end

@macro-dadt thanks a lot, but i'm updating to XCode 9.4.1. This lib compile on this version with no problems?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deepumukundan picture deepumukundan  路  3Comments

brytnvmg picture brytnvmg  路  4Comments

BrandonShega picture BrandonShega  路  4Comments

PrashantKT picture PrashantKT  路  3Comments

Bharati555 picture Bharati555  路  4Comments