ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.
Apache License 2.0
27.43k stars 5.97k forks source link

visionOS support #5146

Open gabors opened 5 months ago

gabors commented 5 months ago

Please add support for compiling on visionOS.

So far the only issue I found to make it work is the usage of the NSUIScreen, as UIScreen is unavalable on visionOS. This framework uses it to determine the scale

Oh and another spot is super.accessibilityFrame = containerView.convert(newValue, to: UIScreen.main.coordinateSpace)

Other than that adding #if os(iOS) || os(tvOS) || os(visionOS) does the trick.