summaryrefslogtreecommitdiffstats
path: root/doc/src/platforms/apple-getting-started.qdocinc
blob: 1f12a73990bd5faba8f48385951acb707ad1ff4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: http://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 http://www.qt.io/terms-conditions. For further
** information use the contact form at http://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: http://www.gnu.org/copyleft/fdl.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.

    We currently have one example mixing Objective-C and C++ code. You
    find it
    \l{http://wiki.qt.io/Mixing_C_and_ObjectiveC_Code}{here}.
//! [getting started]
*/