Cross-platform native WebView for Qt applications — Android, iOS, macOS.
The repository contains:
mobilewebview/— reusable Qt library (MobileWebView)test-app/— standalone test application that exercises the libraryMakefile— single entry point for building and running on all platforms
make run TARGET_OS=macosSet the required environment variables for your target platform (see below), then run:
make run TARGET_OS=ios-simulator
make run TARGET_OS=ios
make run TARGET_OS=android
make run TARGET_OS=android-emulatorTo build without launching the app:
make build TARGET_OS=ios-simulatorTo clean the build directory for a target:
make clean TARGET_OS=ios-simulator| TARGET_OS | Variable | Example |
|---|---|---|
macos |
QTDIR |
~/Qt/6.9.2/macos |
ios-simulator |
QTDIR |
~/Qt/6.9.2/ios |
QT_HOST_PATH |
~/Qt/6.9.2/macos |
|
ios |
QTDIR |
~/Qt/6.9.2/ios |
QT_HOST_PATH |
~/Qt/6.9.2/macos |
|
DEVELOPMENT_TEAM |
YOUR_APPLE_TEAM_ID |
|
android |
QTDIR |
~/Qt/6.9.2/android_arm64_v8a |
QT_HOST_PATH |
~/Qt/6.9.2/macos |
|
ANDROID_SDK_ROOT |
~/Library/Android/sdk |
|
ANDROID_NDK_ROOT |
~/Library/Android/sdk/ndk/27.2.12479018 |
|
JAVA_HOME |
/usr/libexec/java_home -v 17 |
|
android-emulator |
same as android |
(use x86_64 Qt kit) |
You can export these in your shell profile or pass them inline:
QTDIR=~/Qt/6.9.2/ios \
QT_HOST_PATH=~/Qt/6.9.2/macos \
DEVELOPMENT_TEAM=YOUR_APPLE_TEAM_ID \
make run TARGET_OS=iosSee BUILD.md for details on building MobileWebView as a static or dynamic library.