diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf
index 9a429b1f6eb..80c1fc66cde 100644
--- a/mkspecs/features/uikit/default_post.prf
+++ b/mkspecs/features/uikit/default_post.prf
@@ -29,12 +29,15 @@ macx-xcode {
QMAKE_MAC_XCODE_SETTINGS += device_family
ios {
- # Set up default LaunchScreen
- qmake_launch_screen = LaunchScreen.storyboard
- qmake_copy_launch_screen.input = $$QMAKESPEC/$$qmake_launch_screen
- qmake_copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_screen
- QMAKE_SUBSTITUTES += qmake_copy_launch_screen
- qmake_launch_screens.files = $$qmake_copy_launch_screen.output
+ isEmpty(QMAKE_IOS_LAUNCH_SCREEN) {
+ qmake_launch_screen = LaunchScreen.storyboard
+ qmake_copy_launch_screen.input = $$QMAKESPEC/$$qmake_launch_screen
+ qmake_copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$qmake_launch_screen
+ QMAKE_SUBSTITUTES += qmake_copy_launch_screen
+ qmake_launch_screens.files = $$qmake_copy_launch_screen.output
+ } else {
+ qmake_launch_screens.files = $$QMAKE_IOS_LAUNCH_SCREEN
+ }
QMAKE_BUNDLE_DATA += qmake_launch_screens
}
}
diff --git a/mkspecs/macx-ios-clang/Info.plist.app b/mkspecs/macx-ios-clang/Info.plist.app
index 03ba3e82b49..ecea6c03771 100644
--- a/mkspecs/macx-ios-clang/Info.plist.app
+++ b/mkspecs/macx-ios-clang/Info.plist.app
@@ -27,7 +27,7 @@
NOTE
This file was generated by Qt/QMake.
UILaunchStoryboardName
- LaunchScreen
+ ${IOS_LAUNCH_SCREEN}
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index 085cd5c4617..5d77e74dcf1 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -2260,6 +2260,9 @@
\row
\li \c ${WATCHOS_DEPLOYMENT_TARGET}
\li Expands to the value of QMAKE_WATCHOS_DEPLOYMENT_TARGET.
+ \row
+ \li \c ${IOS_LAUNCH_SCREEN}
+ \li Expands to the value of QMAKE_IOS_LAUNCH_SCREEN.
\endtable
\note When using the Xcode generator, the above \c{${var}}-style
@@ -2283,6 +2286,13 @@
For more information, see \l {Expressing Supported iOS Versions}.
+ \section1 QMAKE_IOS_LAUNCH_SCREEN
+
+ \note This variable is used on the iOS platform only.
+
+ Specifies the launch screen that is used by the application. If this is not set
+ then a default launch screen is used.
+
\section1 QMAKE_LFLAGS
Specifies a general set of flags that are passed to
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index c6aab40d858..93b8151c31e 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1615,6 +1615,12 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
plist_in_text.replace(QLatin1String("@TYPEINFO@"),
(project->isEmpty("QMAKE_PKGINFO_TYPEINFO")
? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4).toQString()));
+ QString launchScreen = var("QMAKE_IOS_LAUNCH_SCREEN");
+ if (launchScreen.isEmpty())
+ launchScreen = QLatin1String("LaunchScreen");
+ else
+ launchScreen = QFileInfo(launchScreen).baseName();
+ plist_in_text.replace(QLatin1String("${IOS_LAUNCH_SCREEN}"), launchScreen);
QFile plist_out_file(Option::output_dir + "/Info.plist");
if (plist_out_file.open(QIODevice::WriteOnly | QIODevice::Text)) {
QTextStream plist_out(&plist_out_file);
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 48352c0c47c..190f5e355a8 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -798,6 +798,13 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
commonSedArgs << "-e \"s,\\$${WATCHOS_DEPLOYMENT_TARGET},"
<< project->first("QMAKE_WATCHOS_DEPLOYMENT_TARGET").toQString() << ",g\" ";
+ QString launchScreen = var("QMAKE_IOS_LAUNCH_SCREEN");
+ if (launchScreen.isEmpty())
+ launchScreen = QLatin1String("LaunchScreen");
+ else
+ launchScreen = QFileInfo(launchScreen).baseName();
+ commonSedArgs << "-e \"s,\\$${IOS_LAUNCH_SCREEN}," << launchScreen << ",g\" ";
+
if (!isFramework) {
ProString app_bundle_name = var("QMAKE_APPLICATION_BUNDLE_NAME");
if (app_bundle_name.isEmpty())