Charts: Getting error after updating XCode to 10 from 9.4

Created on 25 Sep 2018  Â·  22Comments  Â·  Source: danielgindi/Charts

ℹ I updated the Xcode and now I am getting an error in Charts Library.

I have updated the Chart to v3.2 using pod update and still, I am getting an error like this please check the screenshot.

** Screenshot: https://imgur.com/a/bDu96UF

I am using Charts v3.2.0

All 22 comments

Changing Charts pod Swift language version from 4 to 4.2 and cleaning build folder fixed it for me.

Changing Charts pod Swift language version from 4 to 4.2 and cleaning build folder fixed it for me.

I did it but still the same issues

I am still having the same issue, even after cleaning the build. I have even completely reinstalled both Xcode and the newest version of CoocaPods, which is currently 1.6(beta) I believe. Please advise. If I need to go back to the non beta Cocoa Pods version I will, but I don't believe it fixes this issue though.
Xcode 10
MacOS Mojave

screen shot 2018-09-25 at 9 30 07 am

Update: Not one of the suggested fixes has worked. Please fix whatever is broken Charts ASP. My Screenshot should be more than enough to get this sorted quickly. I spent a lot of time working to integrate charts into my iOS project, and Xcode 10 is no longer in beta, so to leave us hanging here with no response for this long is a bit frustrating. If I don't receive a response or fix in the next few days, I will be forced to abandon using charts and use a different framework instead. Please get this sorted and if there are specific steps that we need to follow to on our end please let us know what they are. Thank you very much!!!

I'm having the same issue, does anyone have any solution for this yet?

I'm having the same issue

pod 'Charts', :git => 'https://github.com/danielgindi/Charts.git', :branch => 'master'

master should be the same as 3.2.0.

Is this an issue of pod itself? Has anyone tried

Changing Charts pod Swift language version from 4 to 4.2 and cleaning build folder fixed it for me.

@petester42 any idea?

I checked one issue from https://github.com/CocoaPods/CocoaPods/issues/8118
to quote:

This is the default version of Swift used by Xcode 10. These pod authors must specify the Swift version they support otherwise it defaults to whatever your target is using.

So Charts 3.2.0 is already on Swift 4.2, if your pod is showing Charts not work with Swift 4.2, something must be wrong. Please double check, or provide a demo project.

Changing Charts pod Swift language version from 4 to 4.2 and cleaning build folder fixed it for me.

Can somebody show me how to do this?
sorry for the dump question, i'm an iOS newbie.
Thanks in advance.

@kienvanba if you are new to iOS, I suggest you use the source code as a beginning. Pod is not that easy to track down some weird issues for new users.

Force setting to Swift 4.2 may cause trouble on your side

Charts 3.1.0
Pods -> build settings -> swift language version -> swift 4

Wait for the author to update it.

Try updating to the last est cocoapods and see if that fixes your problem. I did have problems publishing 3.2 but updating to the beta of cocoapods fixed my issues.

Apart from that try the normal stuff. Delete derived data, clean the project and rebuild. You could also delete all your pod stuff from your folder and doing pod install again

Hi,

The podspec is missing the swift_version key, which should be set to 4.2. And to ensure that works, you may also want to add a minimum cocoapods_version, so:

  s.swift_version = '4.2'
  s.cocoapods_version = '>= 1.4.0'

See here for example:
https://github.com/SwiftGen/StencilSwiftKit/blob/master/StencilSwiftKit.podspec#L19

Also note that the .swift-version file has been deprecated by CocoaPods (since 1.4.0).

Thanks for the info!

While waiting for the podspec to be updated, in my podfile I use:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            # Set missing swift version for Charts
            if ['Charts'].include? target.name
                config.build_settings['SWIFT_VERSION'] = '4.2'
            end
        end
    end
end

Due to signing issues related to (https://github.com/CocoaPods/CocoaPods/issues/7708) we are requiring cocoa pods 1.6.0.beta.1 or greater.

When I updated Charts to V3.2.0, I finded some properties and some classes had been removed in Charts-Swift.h file. For example, the property drawRoundedBarEnabled and the class ChartBalloonMarker. What can i use some other to instead of these?

3.2.1 release with these changes

Thanks!

Nothing worked. Then, out of frustration, I deleted my Pod directory and ran pod install again.
Now it works again 🥵

The joys of dependency management. Glad you found a solution!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danishnaeem57 picture danishnaeem57  Â·  40Comments

ghost picture ghost  Â·  59Comments

edalford11 picture edalford11  Â·  25Comments

lewissk picture lewissk  Â·  26Comments

zykis picture zykis  Â·  21Comments