Apologies that this is probably a simple problem.
I've started from a sample code provided by Apple and changed it quite significantly. However, I'm not able to Archive the app.
The original visionOS sample code has the same issue, so hopefully someone will be able to spot the problem:
https://developer.apple.com/documentation/visionos/creating-stereoscopic-image-in-visionos
The problems shown in the log are: Undefined symbol: _main Linker command failed with exit code 1 (use -v to see invocation)
The first error seems to say that there's no "main" but there is indeed a @main in the EntryPoint.swift file.
Any ideas? I have archived other apps (built from scratch) successfully, but clearly there's something different about this sample code.
Many thanks!