Build Qt5 on iOS

Introduction

We will build Qt5.15.19 for iOS. Unlike the Linux and Windows builds, this build does not include Qt WebEngine.

This is not a choice, it is an Apple restriction. Apple does not allow Qt WebEngine, or any other third-party rendering engine, on iOS. Every app that displays web content must use WebKit (WKWebView). So on iOS, garlic-player has to rely on WebKit instead of QWebEngine, and Qt WebEngine is skipped from the build entirely.

This has a welcome side effect: because QWebEngine is skipped entirely, the build also works with the current Xcode 26.6 (2026), even though Qt5.15 predates it by several years. QWebEngine is the component that usually breaks first with newer Xcode and SDK versions, so leaving it out removes the main source of incompatibility.

Using a recent Xcode matters beyond just compiling. Apple requires apps to be built and submitted with a current Xcode and SDK version to be accepted into the App Store. Sticking to an old Xcode just to keep Qt5.15 compiling would eventually block App Store submissions altogether.

Requirements

Build Steps for Qt on iOS

The build is driven by a small shell script that sets a few variables (Qt version, base path, number of parallel jobs, and which Xcode to use) and then runs the actual build steps below. We will go through those steps directly.

Enter the Shadow Build Directory

mkdir -p build-5.15.19
cd build-5.15.19

As with the other platforms, a shadow build directory keeps build artifacts separate from the Qt source tree, which makes cleanup and parallel configurations much easier.

Configure Qt for iOS

$QT_SRC/configure -xplatform macx-ios-clang \
    -release -optimize-size \
	-opensource -confirm-license -nomake tests -nomake examples \
    -no-openssl -securetransport \
    -no-pch \
    -prefix /path/to/Ot/install-dir \
    -skip qttranslations \
    -skip qtserialport \
    -skip qtwayland \
    -skip qtwebengine \
    -skip qtscript \
    -skip qt3d \
    -skip qtlocation \
    -skip qtdoc \
    -skip qtpurchasing \
    -skip qtvirtualkeyboard \
    -skip qtspeech

Configure Explanations

If something is missing or fails, configure will print a more or less detailed notice. If everything completes fine, continue to the next step.

Build

make -j12

The -j value sets the number of parallel compile jobs. Lower it if you run out of memory. On a modern Mac with 16 GB of RAM, this step typically takes 30 to 60 minutes, considerably faster than a desktop build with QWebEngine since that component is skipped entirely.

Install

make install

This installs the compiled Qt libraries into the prefix directory, ready to be used as an iOS Qt kit in Qt Creator or referenced directly from Xcode project settings.

Verify the installation

path/to/qt/5.15.19/ios/bin/qmake -v

This should print the Qt version along with the iOS platform spec used to build it.

Troubleshooting

Share Your Thoughts

If you have any ideas, suggestions for improvement, or run into issues with a specific Xcode version, feel free to reach out. You can share your feedback by email or by giving my project a star on GitHub.