Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is it possible to create an iOS and visionOS compatible app within a single project?

I’ve been working on several visionOS demos without concerning about multiplatform compatibility, now than I’m ready to develop a full app I’ve found out that creating a multiplatform project (at least iOS and visionOS) isn’t as straight forward as I expected, now not even sure if it’s possible.

Choosing Multiplatform in the new project wizard only allows running on iOS and macOS, and choosing visionOS only allows (obviously) running on the visor. I understand that Apple Vision has unique capabilities, but for an app that it’s 90% a regular SwiftUI windows navigable, I’d like to think that I don’t need to mantain to parallel projects.

So is it possible to have one single project executable in all devices? (even if there’re some specific immersive features available only for visionOS)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Yes. You can even have your project compatible to macOS. When you setup your Xcode project, you must add the Apple Vision and Mac app Designed for iPad.

The Apple’s idea is to create an iPad version of your application, which is compatible for those two devices. You still have to use conditional statements to use different background materials for your visionOS app or other setup, but it is easy to do so with SwiftUI.

Xcode Version 15.2

To do so, within your Xcode project, go to: Your project Name -> Your Project Target -> General -> Supported Destinations.

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading