blob: d5a8cf4441beb83efdeb44f409f2e2e71739f1ce [file] [log] [blame]
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*
//! [getting started]
\section1 Getting Started
Development and deployment is done using Xcode. The supported
workflow is to maintain a \c .pro file based project, which
generates an Xcode project. Building and deploying can be done
using either Xcode or Qt Creator. We will look at that in more
detail in the next section.
The minimum deployment target for Qt applications is specified in
\l {Supported Platforms}.
\section2 Setting Up the Development Environment
You can download the Qt 5 installers from the \l Downloads page.
For more information, see \l{Getting Started with Qt}.
Before installing Qt, you first need to install
Xcode. You will find it in the Mac App Store \l{Xcode}{here}.
\note As recommended by Apple, you should always use the latest
Xcode version when building your applications for the App Store.
In practice this means you also need the latest version of \macos to develop
apps with Qt, due to Xcode's system requirements.
For running Qt applications on your Mac or in the simulator that comes with
Xcode, this is all you need. However, for running applications on a
mobile device and/or publishing your applications in the App Store, you must
join the \l{Apple Developer Program}, and set up
developer certificates and provisioning profiles. The easiest
solution is to use a profile that takes any App ID (a \c *).
Before building any Qt applications, you should test that Xcode
is set up correctly, for example, by running one of the standard
Xcode application templates on your device.
\section2 Building Applications From the Command Line
As mentioned previously, the development workflow consists
of maintaining a normal \c .pro file project and exporting it to
Xcode.
Here is how to build a project with Xcode:
\list
\li run qmake (if you have not done so previously)
\li open the resulting \c .xcodeproj file in Xcode
\li build the application in Xcode
\endlist
Note that you must re-import the project if its setup changes, for
example, when adding or removing source files.
\section2 Building Applications with Qt Creator
You can find information on how to set up and run Apple mobile device
applications in Qt Creator's manual:
\list
\li \l{Qt Creator: Connecting iOS devices}{Connecting Apple Mobile Devices}.
\endlist
As mentioned previously, you must have Xcode installed.
\section1 Using Objective-C Code in Qt Applications
Clang, the compiler used for applications on Apple Platforms, allows mixing
C++ and Objective-C code. To enable this mode, suffix your source
files with \c .mm, and add them to \c OBJECTIVE_SOURCES instead of
\c SOURCES in the \c .pro file. This makes it possible to use
frameworks from Apple's Developer Library in Qt applications.
Most useful is perhaps the possibility for adding In-App
Purchasing with the StoreKit framework.
//! [getting started]
*/