// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
    \page qt3dxr-quick-start-guide-applevisionpro.html
    \title Getting Started With Apple Vision Pro

    \brief This topic provides instructions on how to get up and running
    with \qxr on a visionOS device or simulator.

    \section1 Introduction

    This guide will get you started developing applications for \tm visionOS.

    Before starting, it is crucial to understand that there are two ways to develop applications
    for visionOS. The first method we'll refer to produces "low-immersion" applications. These
    applications can be developed as any regular iPad/iOS application and deployed to visionOS,
    these applications run in windowed mode and look like a regular iPad application
    floating in your VR environment.

    \note  visionOS specific applications can also be placed in the \e low-immersion mode and will
    essentially work the same as an iPad/iOS application.

    We'll refer to the second method as producing \e high-immersion applications. These applications
    are developed using the visionOS SDK and are run in "full screen" mode, meaning QtQuick3D takes
    complete control of the rendering, with some exceptions (Like pass-through video of the hands).

    \note visionOS supports applications transitioning between these two states, but this is not
    supported by QtQuick3D.Xr.

    \note Developing for visionOS requires Apple hardware with Apple Silicon.

    \note There is no binary build of Qt for visionOS. You will need to build Qt from source. See
    \l{Building Qt for visionOS} for more information.

    \section1 Deploying a low-immersion application

    To deploy an iPad/iOS application to visionOS, build and deploy the application as you
    would normally for \l {Qt for iOS}{iOS/iPad}.

    \section1 Building Qt for visionOS

    To build Qt for visionOS, you will need the Qt  source code with Qt Quick3D; see \l {Building
    Qt Sources} for more information on getting the source code.

    \section2 Configuring and building for the simulator

    A minimal configure command for building Qt for the visionOS simulator would look like this:

    \badcode
    [QT_SOURCE_DIR]/configure -qt-host-path [PATH_TO_QT_HOST_BUILD] -platform macx-visionos-clang -sdk xrsimulator -submodules qtquick3d
    \endcode

    After configuring, you can build using your build tool, for example, CMake.

    \section2 Configuring and building for the device

    A minimal configure command for building Qt for the visionOS device would look like this:

    \badcode
    [QT_SOURCE_DIR]/configure -qt-host-path [PATH_TO_QT_HOST_BUILD] -platform macx-visionos-clang -sdk xros -submodules qtquick3d
    \endcode

    After configuring, you can build using your build tool.

    \section2 Deploying a visionOS application

    To deploy a visionOS application, you will need Xcode with the visionOS SDK
    components installed and, optionally, the visionOS simulator.
    See \l{visionOS_supported_versions}{supported versions} for more information.

    \note Unlike the iOS/iPad applications, visionOS applications are not deployed using
    \QC, but instead using Xcode.

    To build one of Qt's examples for visionOS, you can use the following command:

    \badcode
    [QT_VISIONOS_BUILD]/bin/qt-cmake -B [EXAMPLE_BUILD_DIR] -S [EXAMPLE_SOURCE_DIR]
    \endcode

    Running this command produces an Xcode project that you can open in Xcode and deploy to the device.

*/
