How to create a native visionOS App archive using a MacBook

I coded a native visionOS App using Xcode on a MacBook in SwiftUI but I can't generate an archive for the AppleConnectStore. Apple states that:

Developing for visionOS requires a Mac with Apple silicon.

so I should satisfy the dev requirements.

My Target is for visionOS alone. But I don't see a visionOS native visionOS in the Xcode product destination list.

When I select the Any visionOS Device (Designed for iPad, arm64) option the archive is generated and uploads but ends up in the iOS part of the AppleConnectStore. And when I select the Any visionOS Simulator Device (arm64, x86_64) then the archive won't build and the following error message occurs:

Any suggestions or pointers to tutorials showing the archive for visionOS step would be be greatly appreciated. Alan

You can't use the option you selected for the iPad compatible VisionOS. You should see the: Any Apple VisionOS Device (armv7) But I don't know why you don't see this in the list, your settings look correct.

Did you add Apple Vision to the general tab in the project for an existing iOS project? Remove the designed for iPad and add the Apple Vision destination.

Try to create a new VisionOS App project to see if you have the build option.

Add it from the "Supported destinations" on the first step:

https://developer.apple.com/documentation/visionos/bringing-your-app-to-visionos

It is already the target Supported destination.

It's also in the included in the project Deployment

And it's in the target architecture

Just now I added it to the Targeted Device Families for vision OS deployment but that didn't help.

There are so many different tabs and settings... is there a way of getting this in xml/json to pinpoint the entry that is missing?

Success!

I switched to a different scheme and then the correct destination appeared. I've no idea which of the dip switches was relevant but once I've identified the scheme setting I'll post the answer here.

Here's the nub... The scheme does not directly include a reference to the platform used, but it does directly reference the Targets config, which determines the platform used. I had assumed that I select the Target by placing the cursor on the Targets config when building the archive, but this is irrelevant 🤦‍♂️ And the Targets config used is specified in the Builds tab, not the archive tab (where I'd expected it)

Such a simple solution - now I finally understand the relation between Targets, Schemes and the builds.

How to create a native visionOS App archive using a MacBook
 
 
Q