Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Apple Vision Pro #387

Open
edorphy opened this issue Jan 26, 2024 · 8 comments · May be fixed by #391
Open

Add support for Apple Vision Pro #387

edorphy opened this issue Jan 26, 2024 · 8 comments · May be fixed by #391

Comments

@edorphy
Copy link

edorphy commented Jan 26, 2024

New device coming soon. Has anyone had a chance at a developer lab with the Apple Vision Pro to know what the hardware id is?

I'm trying to reliably determine if the app running in Designed for iPad mode is on visionOS or not. There is no ProcessInfo .isVision func like there is for running on Mac.

@gabors
Copy link

gabors commented Jan 30, 2024

@Zandor300 Please add enough support so we can compile on visionOS for now, actual features can come later.

@kudit
Copy link

kudit commented Jan 31, 2024

I'm working on a fork that does support visionOS and macOS. If you're interested in contributing there, try http://github.com/kudit/DeviceKit

@Zandor300
Copy link
Member

I am currently on holiday, next week I will try to take a look. @gabors

@Zandor300 Zandor300 linked a pull request Feb 6, 2024 that will close this issue
@Zandor300
Copy link
Member

@edorphy I am curious, you would like to detect if you are running on visionOS using 'Designed for iPad' mode or natively. What will DeviceKit report as device when the app is running on visionOS? Have you tried this already?

@kudit
Copy link

kudit commented Mar 20, 2024

I've created a spinoff project that supports visionOS and macOS and can be developed using Swift Playgrounds in addition to Xcode. It's designed to be easier to maintain with new device idioms and versions. If you have any feedback, please let me know. http://github.com/kudit/Device

@gabors
Copy link

gabors commented Mar 20, 2024

@kudit I've created this a while ago that has I use for Mac info, it has lots of Mac data, except the recent M3 crop

https://github.com/voyager-software/MacLookup

@edorphy
Copy link
Author

edorphy commented Mar 20, 2024

@Zandor300 It would be good first and foremost to add platform support for this, and macOS, in the swift package itself. This at least helps us not have to conditionally link the framework. I understand there is more work because not all of the things like screen dimensions apply. Those would be appropriately marked with @unavailable as necessary.

platforms: [

As for decoding WHEN on visionOS, there is only one device that reports as "RealityDevice14,1" --> Apple Vision Pro.

When you're running in "Designed for iPad" mode, the device reports itself as an iPad and you can't tell that it is visionOS. There isn't a ProcessInfo property like there is for detecting Apple Silicon :(

@kudit
Copy link

kudit commented Mar 21, 2024

@kudit I've created this a while ago that has I use for Mac info, it has lots of Mac data, except the recent M3 crop

https://github.com/voyager-software/MacLookup

@gabors That's awesome! I'll try to write a script to put it in the format for adding to kudit/Device. I should be able to add colors and your other fields as additional parameters in the Mac spec and update my "Form" enum to include various descriptions. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants