Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Where does the automatic splash screen come from under ios
Qt 6.11 is out! See what's new in the release blog

Where does the automatic splash screen come from under ios

Scheduled Pinned Locked Moved Mobile and Embedded
iossplashscreen
6 Posts 4 Posters 5.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • clogwogC Offline
    clogwogC Offline
    clogwog
    wrote on last edited by clogwog
    #1

    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 ?
    1 Reply Last reply
    0
    • patrikdP Offline
      patrikdP Offline
      patrikd
      wrote on last edited by
      #2

      Hi,
      the splashscreen comes from ios 8.x. In xcode you can set it where you also set the app icon (LaunchImage).
      I don't know a way to deactivate it.
      best,
      patrik

      1 Reply Last reply
      0
      • clogwogC Offline
        clogwogC Offline
        clogwog
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • J Offline
          J Offline
          juddster
          wrote on last edited by juddster
          #4

          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.

          1 Reply Last reply
          0
          • clogwogC Offline
            clogwogC Offline
            clogwog
            wrote on last edited by
            #5

            @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>
               .........
            
            1 Reply Last reply
            0
            • V Offline
              V Offline
              Vega4
              wrote on last edited by
              #6

              facing the exact same issue, have you found a solution?

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved