I have a video analysis app and i'm trying to make it compatible with visionOS. It crashes because camera is not allowed; Apple only allows to import videos from Photos.
So I would need to check on launch if the device runs visionOS to show the photos picker rather than the camera view, similarly to what I use right now to check if I'm on macCatalyst or iOS:
#if targetEnvironment(macCatalyst)
print("We are in macOS Catalyst")
#else
print("We are in iOS")
#endif
Thanks in advance.
#if os(visionOS)
. Can't find it documented though. – Memoried