devicekit / DeviceKit

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

Implement initial support for visionOS. #391

Open Zandor300 opened 5 months ago

Zandor300 commented 5 months ago

Implements initial support for visionOS. The goals is to have DeviceKit the current device as an "Apple Vision Pro" but not yet add any visionOS specific extra features.

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

github-actions[bot] commented 5 months ago
1 Warning
:warning: Plist changed, don't forget to localize your plist values

Generated by :no_entry_sign: Danger

denandreychuk commented 5 months ago

Did you test it on real vision pro device? Cause RealityDevice14,1 seems like a wrong identifier for a real one: https://stackoverflow.com/a/76777118

Check last comment:

Unfortunately, this solution doesn't seem to work on a real device. We don't have one to check for sure, but our app didn't pass a compatibility check at Apple - the app tries to use unavailable APIs which we have restricted on Vision Pro, but the device check fails

Zandor300 commented 5 months ago

@denandreychuk I live in EU and so am unable to get ahold of a physical device. (Would if I could)

This PR is still a draft, if someone with an actual device could possibly join in that would be really great!

denandreychuk commented 5 months ago

For everyone who is wondering, the device name for the real Vision Pro is iPad13,4. It has a .front camera, but does not have a .rear camera for UIImagePickerController.isCameraDeviceAvailable.

Zandor300 commented 5 months ago

@denandreychuk Isn’t that the case when running in the “Vision Pro (made for iPad)” mode? This PR is intended for apps built specifically for visionOS without any iPadOS to visionOS translation.

denandreychuk commented 5 months ago

Oh, I see. Yeah, this is when the app running in compatible mode