Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error after updating XCode to 10 from 9.4 #3661

Closed
lekhakmukesh opened this issue Sep 25, 2018 · 22 comments
Closed

Getting error after updating XCode to 10 from 9.4 #3661

lekhakmukesh opened this issue Sep 25, 2018 · 22 comments
Assignees

Comments

@lekhakmukesh
Copy link

lekhakmukesh commented Sep 25, 2018

ℹ 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

@gregacucnik
Copy link

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

@lekhakmukesh
Copy link
Author

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

@sdevo619
Copy link

sdevo619 commented Sep 25, 2018

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!!!

@kienvanba
Copy link

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

@wangxumin
Copy link

I'm having the same issue

@harofan
Copy link

harofan commented Sep 26, 2018

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

@liuxuan30
Copy link
Member

liuxuan30 commented Sep 27, 2018

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 CocoaPods/CocoaPods#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.

@kienvanba
Copy link

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.

@liuxuan30
Copy link
Member

@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

@harofan
Copy link

harofan commented Sep 27, 2018

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

Wait for the author to update it.

@pmairoldi
Copy link
Collaborator

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.

@pmairoldi
Copy link
Collaborator

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

@djbe
Copy link

djbe commented Sep 30, 2018

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

@djbe
Copy link

djbe commented Sep 30, 2018

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

@pmairoldi
Copy link
Collaborator

Thanks for the info!

@npabion
Copy link

npabion commented Oct 2, 2018

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

@pmairoldi pmairoldi self-assigned this Oct 2, 2018
@pmairoldi
Copy link
Collaborator

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

@yuanhh90
Copy link

yuanhh90 commented Oct 8, 2018

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?

@pmairoldi
Copy link
Collaborator

3.2.1 release with these changes

@yuanhh90
Copy link

Thanks!

shineeth pushed a commit to shineeth/Charts that referenced this issue Oct 31, 2018
@frogg
Copy link

frogg commented Nov 5, 2018

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

@pmairoldi
Copy link
Collaborator

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

mtpromano pushed a commit to MobileTradingPartnersLLP/ios-charts that referenced this issue Jan 22, 2019
…ing/swift-4.2

* commit 'f2795b9813e7e8c2bcdac3f4c3cc74790116999e': (108 commits)
  Remove delegate method call for translation when no translation really occured
  add call chartScaled() after double tap (ChartsOrg#3770)
  fix ChartsOrg#3719
  Update README.md (ChartsOrg#3737)
  Fix applying lineCap value for line chart data sets (Fixes ChartsOrg#3739)
  Fix legend offset bug for horizontal bar chart (Fixes ChartsOrg#3301)
  Add missing properties to copy(with:) methods (ChartsOrg#3715)
  improvements in barRect height calculation  (ChartsOrg#3650)
  Remove meaningless comment
  fix wrong assignment to axisMaxLabels property
  Add missing empty line between Summary and other section manually
  fix casting warnings
  Fix guard statement format.
  Fix memory leak for macOS.
  Update ChartViewBase.swift
  bump version to 3.2.1
  close ChartsOrg#3659: fix index out of bounds issue when using stacked bar chart
  Fix memory leak after rendering
  close ChartsOrg#3661: update podspec to include swift verison
  fix issue ChartsOrg#3662
  ...

# Conflicts:
#	Charts.xcodeproj/project.pbxproj
#	ChartsDemo-iOS/ChartsDemo-iOS.xcodeproj/project.pbxproj
#	ChartsDemo-iOS/Objective-C/Demos/LineChartFilledViewController.m
#	ChartsDemo-iOS/Objective-C/Demos/RadarChartViewController.m
#	ChartsDemo-iOS/Swift/Demos/CandleStickChartViewController.swift
#	Rakefile
#	Source/Charts/Charts/BarLineChartViewBase.swift
#	Source/Charts/Charts/ChartViewBase.swift
#	Source/Charts/Charts/HorizontalBarChartView.swift
#	Source/Charts/Charts/PieChartView.swift
#	Source/Charts/Charts/RadarChartView.swift
#	Source/Charts/Components/Legend.swift
#	Source/Charts/Components/Marker.swift
#	Source/Charts/Components/YAxis.swift
#	Source/Charts/Data/Implementations/ChartBaseDataSet.swift
#	Source/Charts/Data/Implementations/Standard/ChartData.swift
#	Source/Charts/Data/Implementations/Standard/PieChartData.swift
#	Source/Charts/Data/Interfaces/ChartDataSetProtocol.swift
#	Source/Charts/Data/Interfaces/ScatterChartDataSetProtocol.swift
#	Source/Charts/Filters/DataApproximator+N.swift
#	Source/Charts/Formatters/FillFormatter.swift
#	Source/Charts/Formatters/ValueFormatter.swift
#	Source/Charts/Highlight/BarHighlighter.swift
#	Source/Charts/Highlight/ChartHighlighter.swift
#	Source/Charts/Highlight/HorizontalBarHighlighter.swift
#	Source/Charts/Renderers/AxisRendererBase.swift
#	Source/Charts/Renderers/BarChartRenderer.swift
#	Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift
#	Source/Charts/Renderers/BubbleChartRenderer.swift
#	Source/Charts/Renderers/CandleStickChartRenderer.swift
#	Source/Charts/Renderers/ChartDataRendererBase.swift
#	Source/Charts/Renderers/CombinedChartRenderer.swift
#	Source/Charts/Renderers/HorizontalBarChartRenderer.swift
#	Source/Charts/Renderers/LegendRenderer.swift
#	Source/Charts/Renderers/LineChartRenderer.swift
#	Source/Charts/Renderers/PieChartRenderer.swift
#	Source/Charts/Renderers/RadarChartRenderer.swift
#	Source/Charts/Renderers/Renderer.swift
#	Source/Charts/Renderers/ScatterChartRenderer.swift
#	Source/Charts/Renderers/XAxisRenderer.swift
#	Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift
#	Source/Charts/Renderers/XAxisRendererRadarChart.swift
#	Source/Charts/Renderers/YAxisRenderer.swift
#	Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift
#	Source/Charts/Renderers/YAxisRendererRadarChart.swift
#	Source/Charts/Utils/ChartUtils.swift
#	Source/Charts/Utils/ViewPortHandler.swift
#	Tests/ReferenceImages_64/ChartsTests.CombinedChartTests/[email protected]
#	Tests/ReferenceImages_64/ChartsTests.CombinedChartTests/testAllRightAxisDependency_tvOS_1920.0_1080.0.png
#	Tests/ReferenceImages_64/ChartsTests.CombinedChartTests/[email protected]
#	Tests/ReferenceImages_64/ChartsTests.CombinedChartTests/testDefaultAxisDependency_tvOS_1920.0_1080.0.png
#	Tests/ReferenceImages_64/ChartsTests.CombinedChartTests/[email protected]
#	Tests/ReferenceImages_64/ChartsTests.CombinedChartTests/testLeftRightAxisDependency_tvOS_1920.0_1080.0.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests