Doc: Turn "Connecting iOS Devices" into how-to and reference topics

Task-number: QTCREATORBUG-29361
Change-Id: I68fd249e702e2c262182b12c032a0e8325781eff
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Leena Miettinen
2024-04-26 14:21:05 +02:00
parent 7039c06f82
commit 2f5057579e
8 changed files with 136 additions and 109 deletions

View File

@@ -88,6 +88,12 @@
kit with the toolchain and the Qt version for the device's architecture. kit with the toolchain and the Qt version for the device's architecture.
When possible, \QOI creates suitable kits for you. When possible, \QOI creates suitable kits for you.
\section2 iOS
Install \l {Qt for iOS} and Xcode.
\generatelist creator-how-to-ios
\section2 MCUs \section2 MCUs
Install \l {Qt for MCUs} and connect devices to the computer to run and Install \l {Qt for MCUs} and connect devices to the computer to run and

View File

@@ -2,19 +2,20 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*! /*!
\previouspage creator-adding-docker-devices.html
\page creator-developing-ios.html \page creator-developing-ios.html
\nextpage creator-developing-mcu.html \previouspage creator-reference.html
\title Connecting iOS Devices \ingroup creator-reference-devices
You can connect iOS devices to your local machine with a USB cable to \title Developing for iOS
run applications built for them from \QC.
To be able to use \QC on \macos, you must install Xcode, and therefore, \brief Connect iOS devices to your local machine with a USB cable to
run applications on them.
To use \QC on \macos, you must install Xcode, and therefore,
you already have the tool chain for building applications for iOS. \QC you already have the tool chain for building applications for iOS. \QC
automatically detects the tool chain and creates the necessary automatically detects the tool chain and creates the necessary
\l{glossary-buildandrun-kit}{kits} to build applications for and run them on \l{Kits}{kits} to build applications for and run them on
configured iOS devices. configured iOS devices.
You only need Qt libraries that are built for iOS. You can install them as You only need Qt libraries that are built for iOS. You can install them as
@@ -29,95 +30,6 @@
physical devices with iOS 17 or later because of limitations of the Apple tool for physical devices with iOS 17 or later because of limitations of the Apple tool for
accessing these devices. accessing these devices.
\section1 Configuring Devices
The connections between \QC and an iOS device are protected by using a
certificate that you receive from Apple when you
\l{https://developer.apple.com/programs/enroll/}
{enroll in the Apple Developer Program}. The certificate is copied to
the device when you configure the device.
The first time you connect the device to your local machine, you are asked to enable
developer mode on the device. The next time you connect the device, \QC
detects it automatically. To disable automatic connections to a device that
you do not use for development, select \uicontrol Preferences >
\uicontrol iOS, and deselect the \uicontrol {Ask about devices not in
developer mode} check box.
\note The process of configuring devices and the UI varies slightly
depending on the Xcode version that you use. We recommend that you use the
latest available Xcode version.
To configure connections between \QC and an iOS device:
\list 1
\li Make sure that you have Xcode and Qt for iOS installed.
\li Connect the device to your local machine with a USB cable.
\li Start Xcode to configure the device.
For example, in Xcode version 15, select \uicontrol Window >
\uicontrol Devices and Simulators > \uicontrol Devices >
\uicontrol + to add the connected device.
\li To specify build settings:
\list 1
\li Open a project for an application you want to develop for the
device.
\li Select \uicontrol Projects > \uicontrol {Build & Run} to select
the kit for building applications for and running them on iOS.
\image qtcreator-ios-add-kit.png "Build & Run Settings"
\li In \uicontrol {iOS Settings}, select the development team to use
for signing and provisioning applications. You must configure
development teams and provisioning profiles in Xcode using an
Apple developer account.
\image qtcreator-build-settings-ios.png "iOS build settings"
\li Select the \uicontrol {Automatically manage signing} check box
to automatically select the provisioning profile and signing
certificate on your local machine that matches the entitlements
and the bundle identifier of the iOS device.
\endlist
\li Select \uicontrol Run to specify run settings.
Usually, you can use the default settings.
When you run the project, \QC uses Xcode to deploy the application to the
device.
Your signing certificate is used to sign application packages for deployment
to the device.
\endlist
\note If you cannot deploy applications because a provisioning profile is
missing, check that provisioning profiles are listed in Xcode by selecting
\uicontrol Xcode > \uicontrol Preferences > \uicontrol Accounts. For more
information about how to acquire and install a provisioning profile, see
Apple documentation.
\section1 Viewing Device Connection Status
When you connect an iOS device to your local machine with USB, \QC
automatically detects the device if you have configured it by using Xcode.
To view information about the connected device, select \uicontrol Preferences >
\uicontrol Devices.
\image qtcreator-ios-device-configurations.png "Devices dialog"
If the current device state is \uicontrol Connected, (the traffic light icon is
orange), you need to configure the device using Xcode.
\section1 Specifying Supported iOS Versions \section1 Specifying Supported iOS Versions
You can build applications for the latest iOS version and deploy them to You can build applications for the latest iOS version and deploy them to
@@ -138,9 +50,115 @@
actual build system code reflects the minimum iOS version that is actually actual build system code reflects the minimum iOS version that is actually
required. required.
For more information, see \l{Expressing Supported iOS Versions}. \sa {iOS}{How To: Develop for iOS}, {Expressing Supported iOS Versions}
*/
\section1 Testing on Simulator /*!
\page creator-how-to-connect-ios-devices.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-ios
\title Connect iOS devices
The connections between \QC and an iOS device are protected by using a
certificate that you receive from Apple when you
\l{https://developer.apple.com/programs/enroll/}
{enroll in the Apple Developer Program}. The certificate is copied to
the device when you configure the device.
The first time you connect the device to your local machine, you are asked to enable
developer mode on the device. The next time you connect the device, \QC
detects it automatically. To disable automatic connections to a device that
you do not use for development, go to preferences > \uicontrol iOS
and clear \uicontrol {Ask about devices not in developer mode}.
\note The process of configuring devices and the UI varies slightly
depending on the Xcode version that you use. We recommend that you use the
latest available Xcode version.
\section1 Create a connection to an iOS device
To configure connections between \QC and an iOS device:
\list 1
\li Check that you installed Xcode and \l{Qt for iOS}.
\li Connect the device to your local machine with a USB cable.
\li Start Xcode to configure the device.
For example, in Xcode version 15, go to \uicontrol Window >
\uicontrol Devices and Simulators > \uicontrol Devices, and select
\uicontrol + to add the connected device.
\li To specify build settings:
\list 1
\li Open a project for an application you want to develop for the
device.
\li Go to \uicontrol Projects > \uicontrol {Build & Run} to select
the kit for building applications for and running them on iOS.
\image qtcreator-ios-add-kit.png "Build & Run Settings"
\li In \uicontrol {iOS Settings}, select the development team to use
for signing and provisioning applications. You must configure
development teams and provisioning profiles in Xcode using an
Apple developer account.
\image qtcreator-build-settings-ios.png "iOS build settings"
\li Select \uicontrol {Automatically manage signing}
to automatically select the provisioning profile and signing
certificate on your local machine that matches the entitlements
and the bundle identifier of the iOS device.
\endlist
\li Select \uicontrol Run to specify run settings.
Usually, you can use the default settings.
When you run the project, \QC uses Xcode to deploy the application to the
device.
Your signing certificate is used to sign application packages for deployment
to the device.
\endlist
\note If you cannot deploy applications because a provisioning profile is
missing, check that provisioning profiles are listed in Xcode by going to
\uicontrol Xcode > \uicontrol Preferences > \uicontrol Accounts. For more
information about how to acquire and install a provisioning profile, see
Apple documentation.
\section1 View device connection status
When you connect an iOS device to your local machine with USB, \QC
automatically detects the device if you have configured it by using Xcode.
To view information about the connected device, go to \uicontrol Preferences >
\uicontrol Devices.
\image qtcreator-ios-device-configurations.png {Devices dialog}
If the current device state is \uicontrol Connected, (the traffic light icon is
orange), you need to configure the device using Xcode.
\sa {iOS}{How To: Develop for iOS}, {Developing for iOS}
*/
/*!
\page creator-how-to-test-on-ios-simulator.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-ios
\title Test on iOS Simulator
If you do not have an iOS device or you do not want to create an account, If you do not have an iOS device or you do not want to create an account,
you can test applications on you can test applications on
@@ -149,12 +167,12 @@
simulates a predefined set of hardware devices and software versions. simulates a predefined set of hardware devices and software versions.
You can change the simulated hardware and software version in the run You can change the simulated hardware and software version in the run
settings for the project. Select \uicontrol Projects > \uicontrol Run, and then select settings for the project. Go to \uicontrol Projects > \uicontrol Run, and then select
the device to simulate in the \uicontrol {Device type} field. the device to simulate in the \uicontrol {Device type} field.
\image qtcreator-ios-simulator-deploy.png \image qtcreator-ios-simulator-deploy.png
The simulator is started automatically when you run the application. The simulator starts automatically when you run the application.
To start the simulator manually, either start the Simulator application To start the simulator manually, either start the Simulator application
directly with Spotlight, or go to \uicontrol Xcode > \uicontrol {Open Developer Tool} directly with Spotlight, or go to \uicontrol Xcode > \uicontrol {Open Developer Tool}
in Xcode. in Xcode.
@@ -162,4 +180,6 @@
Manage the available simulator devices Manage the available simulator devices
\l{https://developer.apple.com/documentation/xcode/running-your-app-in-simulator-or-on-a-device/#Configure-the-list-of-simulated-devices} \l{https://developer.apple.com/documentation/xcode/running-your-app-in-simulator-or-on-a-device/#Configure-the-list-of-simulated-devices}
{in Xcode}. {in Xcode}.
\sa {iOS}{How To: Develop for iOS}, {Developing for iOS}
*/ */

View File

@@ -15,7 +15,7 @@
\list \list
\li \l Android \li \l Android
\li \l iOS \li \l iOS Devices
\endlist \endlist
You must install the tool chain for building applications for the targeted You must install the tool chain for building applications for the targeted
@@ -50,7 +50,7 @@
\li \l{Qt for Android} \li \l{Qt for Android}
\endlist \endlist
\section1 iOS \section1 iOS Devices
\note Deployment, running, and debugging on iOS 17 devices are not supported. \note Deployment, running, and debugging on iOS 17 devices are not supported.
@@ -63,7 +63,7 @@
for iOS devices: for iOS devices:
\list \list
\li \l{Connecting iOS Devices} \li \l{Developing for iOs}
\li \l{Run on many platforms} \li \l{Run on many platforms}
\li \l{Creating a Mobile Application} \li \l{Creating a Mobile Application}
\li \l{Qt for iOS} \li \l{Qt for iOS}

View File

@@ -55,7 +55,7 @@
Create Docker devices from Docker images and use them to build, run, Create Docker devices from Docker images and use them to build, run,
and debug applications from \QC. and debug applications from \QC.
\li \l{Connecting iOS Devices} \li \l{Developing for iOS}
You use the tools delivered with Xcode to connect devices to \QC. You use the tools delivered with Xcode to connect devices to \QC.
\QC detects the tools and configured devices automatically and uses \QC detects the tools and configured devices automatically and uses

View File

@@ -23,7 +23,7 @@
To run an example application on an Android or iOS device, you must set up To run an example application on an Android or iOS device, you must set up
the development environment for Android or iOS. For more information, see the development environment for Android or iOS. For more information, see
\l{Connecting Android Devices} and \l{Connecting iOS Devices}. \l{Developing for Android} and \l{Developing for iOS}.
To run an example application on a Boot2Qt device, you must set up To run an example application on a Boot2Qt device, you must set up
Boot2Qt on the development host and create connections Boot2Qt on the development host and create connections
@@ -79,6 +79,6 @@
\endlist \endlist
\sa {Add compilers}, {Add kits}, {Add Qt versions}, \sa {Add compilers}, {Add kits}, {Add Qt versions},
{Connecting Android Devices}, {Connecting iOS Devices}, {Developing for Android}, {Developing for iOS},
{Compile Output}, {Boot2Qt: Documentation}, {Qt Design Studio Manual} {Compile Output}, {Boot2Qt: Documentation}, {Qt Design Studio Manual}
*/ */

View File

@@ -29,7 +29,7 @@
\li \l{Connecting Bare Metal Devices}{Bare Metal} \li \l{Connecting Bare Metal Devices}{Bare Metal}
\li \l{Boot2Qt: Documentation}{Boot2Q} (commercial only) \li \l{Boot2Qt: Documentation}{Boot2Q} (commercial only)
\li \l{Adding Docker Devices}{Docker} (experimental) \li \l{Adding Docker Devices}{Docker} (experimental)
\li \l{Connecting iOS Devices}{iOS} \li \l{Developing for iOS}{iOS}
\li iOS Simulator \li iOS Simulator
\li \l{Connecting MCUs}{MCU} (commercial only) \li \l{Connecting MCUs}{MCU} (commercial only)
\li \l{Connecting QNX Devices}{QNX} \li \l{Connecting QNX Devices}{QNX}

View File

@@ -28,7 +28,6 @@
\li \l{Connecting Bare Metal Devices} \li \l{Connecting Bare Metal Devices}
\li \l{Connecting Boot2Qt Devices} \li \l{Connecting Boot2Qt Devices}
\li \l{Adding Docker Devices} \li \l{Adding Docker Devices}
\li \l{Connecting iOS Devices}
\li \l{Connecting QNX Devices} \li \l{Connecting QNX Devices}
\li \l{Connecting Remote Linux Devices} \li \l{Connecting Remote Linux Devices}
\li \l{Building Applications for the Web} \li \l{Building Applications for the Web}
@@ -58,6 +57,8 @@
\generatelist creator-how-to-design \generatelist creator-how-to-design
\li Develop for Devices \li Develop for Devices
\list \list
\li iOS
\generatelist creator-how-to-ios
\li MCUs \li MCUs
\generatelist creator-how-to-mcu \generatelist creator-how-to-mcu
\endlist \endlist

View File

@@ -37,7 +37,7 @@
To develop for iOS devices, you must install Xcode and use it to configure To develop for iOS devices, you must install Xcode and use it to configure
a device. For this, you need an Apple developer account and iOS Developer a device. For this, you need an Apple developer account and iOS Developer
Program certificate that you receive from Apple. For more information, see Program certificate that you receive from Apple. For more information, see
\l{Connecting iOS Devices}. \l{Developing for iOS}.
\include qtquick-tutorial-create-empty-project.qdocinc qtquick empty application \include qtquick-tutorial-create-empty-project.qdocinc qtquick empty application