devicekit / DeviceKit

DeviceKit is a value-type replacement of UIDevice.
MIT License
4.39k stars 425 forks source link

Fix compilation on recent betas of visionOS #371

Closed chrisvasselli closed 5 months ago

chrisvasselli commented 8 months ago

In recent visionOS betas, #if os(xrOS) is now #if os(visionOS), and #if os(iOS) no longer returns true on visionOS. This required some updates to DeviceKit.

This is not meant to be a PR to fully support Apple Vision Pro information, just something to get DeviceKit building properly on the latest visionOS betas, and provide some scaffolding to start filling out information as it becomes available.

Fixes https://github.com/devicekit/DeviceKit/issues/370

BProg commented 6 months ago

Hi, any news on this?

Zandor300 commented 5 months ago

@chrisvasselli @BProg I've made another PR, that doesn't exclude the entire library when compiling. I'm unable to reproduce the actual issue you are having so could you try my PR or provide an example project where it is happening?

https://github.com/devicekit/DeviceKit/pull/376

chrisvasselli commented 5 months ago

Hi @Zandor300!

You can reproduce the issue by opening the DeviceKit workspace from this repo, and adding Vision Pro to the supported destinations. Then select the Vision Pro simulator as your run destination and attempt to build.

If you're still having trouble reproducing, please let me know!

CleanShot 2024-01-17 at 13 04 12@2x