Where does the automatic splash screen come from under ios
-
I created a "Qt Quick Application" using the QtCreator 'wizard' and the main it generates looks like:
int main(int argc, char *argv[]) { QApplication app(argc, argv); QQmlApplicationEngineQQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); return app.exec(); }
when i run it on ios it automatically first shows a splash screen with the name of the application in text before it continues with the main.qml.
- where does this splash screen come from ? i can not find it anywhere in the code and/or resources.
- what is the normal way of customising this splash screen ? do i just implement it like described here: http://doc.qt.io/qt-5/qsplashscreen.html#details and the auto generated splash screen will no longer be used ?
-
thanks for that. makes my search a bit easier.
i tried adding the splash screen as described here: http://doc.qt.io/qt-5/qsplashscreen.html#details but it disn't stop the ios splash screen
-
As patrikd said, what you're seeing on iOS is what's called a Launch Image. QSplashScreen will not show instead of the launch image.
I think what you're looking for is discussed here: http://doc.qt.io/qt-5/platform-notes-ios.html#launch-images
You will basically need a launch image for each orientation your app supports and add them to the Info.plist file.
-
@patrikd thanks for that.
noticed that i shouldn't be using it as a splash screen but rather as a preview of what will load once the real window is shown.followed the instructions at http://doc.qt.io/qt-5/platform-notes-ios.html#launch-images by creating the
LaunchImage-iOS7-568h@2x.png LaunchImage-iOS7-Landscape.png LaunchImage-iOS7-Landscape@2x.png LaunchImage-iOS7-Portrait.png LaunchImage-iOS7-Portrait@2x.png LaunchImage-iOS7@2x.png
images and adding them to the .pro file as :
ios { QMAKE_INFO_PLIST = iOS_BundleData/Info.plist ios_icon.files = $$files($$PWD/iOS_BundleData/AppIcon*.png) QMAKE_BUNDLE_DATA += ios_icon launch_images.files = $$PWD/ios/Launch.xib $$files($$PWD/iOS_BundleData//LaunchImage*.png) QMAKE_BUNDLE_DATA += launch_images }
and adding them to the info.plist (see below for info.plist file)
but it still shows up with the name of my application. did a clean rebuild but seem to be missing something. Is there an example that uses a launch image to see what i'm doing wrong ?
info.plist follows:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>UILaunchImages</key> <array> <dict> <key>UILaunchImageMinimumOSVersion</key> <string>7.0</string> <key>UILaunchImageName</key> <string>LaunchImage-iOS7</string> <key>UILaunchImageOrientation</key> <string>Portrait</string> <key>UILaunchImageSize</key> <string>{320, 568}</string> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <string>7.0</string> <key>UILaunchImageName</key> <string>LaunchImage-iOS7</string> <key>UILaunchImageOrientation</key> <string>Portrait</string> <key>UILaunchImageSize</key> <string>{320, 480}</string> </dict> </array> <key>UILaunchImages~ipad</key> <array> <dict> <key>UILaunchImageMinimumOSVersion</key> <string>7.0</string> <key>UILaunchImageName</key> <string>LaunchImage-iOS7-Landscape</string> <key>UILaunchImageOrientation</key> <string>Landscape</string> <key>UILaunchImageSize</key> <string>{768, 1024}</string> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <string>7.0</string> <key>UILaunchImageName</key> <string>LaunchImage-iOS7-Portrait</string> <key>UILaunchImageOrientation</key> <string>Portrait</string> <key>UILaunchImageSize</key> <string>{768, 1024}</string> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <string>7.0</string> <key>UILaunchImageName</key> <string>LaunchImage-iOS7</string> <key>UILaunchImageOrientation</key> <string>Portrait</string> <key>UILaunchImageSize</key> <string>{320, 568}</string> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <string>7.0</string> <key>UILaunchImageName</key> <string>LaunchImage-iOS7</string> <key>UILaunchImageOrientation</key> <string>Portrait</string> <key>UILaunchImageSize</key> <string>{320, 480}</string> </dict> </array> <key>CFBundleIconFile</key> <string></string> .........