Charts icon indicating copy to clipboard operation
Charts copied to clipboard

Failed to build Project in Xcode 14.0.1 with error of protocol 'RangeReplaceableCollection'

Open jslabana24 opened this issue 2 years ago • 18 comments

What did you do?

installed pod 'Charts' and it's not building, showing an error Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection'

ℹ Please replace this with what you did.
just install the latest version of the library (pod) and build the project

What did you expect to happen?

should successfully build the project.

ℹ Please replace this with what you expected to happen.
build project successfully.

What happened instead?

showing error Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection'

Charts Environment

Charts version/Branch/Commit Number: 3.6 Xcode version: 14.0.1 Swift version: iOS 16 Platform(s) running Charts: - macOS version running Xcode: macOS Monterey v12.6

Screenshot 2022-10-20 at 9 54 54 PM Screenshot 2022-10-20 at 9 55 18 PM

jslabana24 avatar Oct 20 '22 16:10 jslabana24

Hi @jslabana24, I got the same issue. Have you have solutions yet? Screen Shot 2022-10-22 at 19 32 07

trinhtran-markany avatar Oct 22 '22 12:10 trinhtran-markany

Hay @trinhtran-markany, There are no updates for this issue from my side will let you know for sure if I get any success on it.

jslabana24 avatar Oct 23 '22 20:10 jslabana24

Is there any update to this?

Pranoy1c avatar Oct 24 '22 21:10 Pranoy1c

any update ..?

Vasudevan-iOS avatar Oct 25 '22 07:10 Vasudevan-iOS

I do a workaround by SPM instead of using cocoapod.

trinhtran-markany avatar Oct 25 '22 08:10 trinhtran-markany

image

DeepSeaLemon avatar Oct 26 '22 02:10 DeepSeaLemon

As an alternative, updating to the latest release: 4.1.0, should also fix the issue. It did for me (with a couple of additional changes like replacing IAxisValueFormatter with AxisValueFormatter for example).

Dario-Gasquez avatar Oct 27 '22 16:10 Dario-Gasquez

Is there any update?

NalineeSingh01 avatar Nov 09 '22 07:11 NalineeSingh01

image

public func replaceSubrange<C>(_ subrange: Swift.Range<Int>, with newElements: C) where C : Collection, ChartDataEntry == C.Element { }

nieyu avatar Nov 11 '22 02:11 nieyu

Is there any update?

lexuanquynh avatar Nov 25 '22 17:11 lexuanquynh

Is there any update?

Updating to the latest release: 4.1.0, should fix the issue. It did for me (with a couple of additional changes like replacing IAxisValueFormatter with AxisValueFormatter for example).

Dario-Gasquez avatar Nov 25 '22 17:11 Dario-Gasquez

In Swift Package manager, I only seem to get version 3.6.0, even when removing and re-adding. Is 4.1.0 available in Swift Package Manager?

steviek avatar Dec 03 '22 01:12 steviek

In Swift Package manager, I only seem to get version 3.6.0, even when removing and re-adding. Is 4.1.0 available in Swift Package Manager?

You should be able to by setting 4.0.0 as the next mayor version when adding the package: adding-charts-as-sp

After that your project should look like this: charts-4 1 0-added

Dario-Gasquez avatar Dec 03 '22 15:12 Dario-Gasquez

Screenshot 2022-12-04 at 12 00 50 AM

I removed the chart pod and moved it to the swift package and it is working. I don't think you need to spend any more time on this issue. Keep it simple and focus on coding.

Screenshot 2022-12-04 at 12 02 07 AM

lexuanquynh avatar Dec 03 '22 17:12 lexuanquynh

Screenshot 2022-12-04 at 12 00 50 AM

I removed the chart pod and moved it to the swift package and it is working. I don't think you need to spend any more time on this issue. Keep it simple and focus on coding.

Screenshot 2022-12-04 at 12 02 07 AM

it works,thank you

Zhitu1234 avatar Dec 17 '22 05:12 Zhitu1234

I still have this problem. Using Charts 4.1.0, on Mac OS Ventura 13.1, Xcode 14.2. We use CocoaPods, not SPM for this project. Is there any plan to get this working?

HollyWallace avatar Jan 13 '23 23:01 HollyWallace

Same here`

adincebic avatar Feb 03 '23 14:02 adincebic

Screenshot 2022-12-04 at 12 00 50 AM

I removed the chart pod and moved it to the swift package and it is working. I don't think you need to spend any more time on this issue. Keep it simple and focus on coding.

Screenshot 2022-12-04 at 12 02 07 AM

It's works form me! Thanks! ❤️

lfoliveir4 avatar Apr 28 '23 12:04 lfoliveir4