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. Displaying iOS Launch Images
Forum Updated to NodeBB v4.3 + New Features

Displaying iOS Launch Images

Scheduled Pinned Locked Moved Mobile and Embedded
ios
10 Posts 3 Posters 4.7k Views 2 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.
  • D Offline
    D Offline
    DRoscoe
    wrote on last edited by
    #1

    I am trying to get my launch image to display on my app, with no success. I cannot find up-to-date information on the proper way to do this in Qt. Here is my .plist file:

    <?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>CFBundleDisplayName</key>
    	<string>TAP Display</string>
    	<key>CFBundleExecutable</key>
    	<string>tap_new_display_app</string>
    	<key>CFBundleGetInfoString</key>
    	<string>Created by Qt/QMake</string>
    	<key>CFBundleIconFile</key>
    	<string>nasa-logo.png</string>
    	<key>CFBundleIdentifier</key>
    	<string>com.nasa.tap-display</string>
    	<key>CFBundleName</key>
    	<string>${PRODUCT_NAME}</string>
    	<key>CFBundlePackageType</key>
    	<string>APPL</string>
    	<key>CFBundleShortVersionString</key>
    	<string>1.0</string>
    	<key>CFBundleSignature</key>
    	<string>????</string>
    	<key>CFBundleVersion</key>
    	<string>1.0</string>
    	<key>LSRequiresIPhoneOS</key>
    	<true/>
    	<key>NOTE</key>
    	<string>This file was generated by Qt/QMake.</string>
    	<key>UILaunchStoryboardName</key>
    	<string>LaunchScreen</string>
    	<key>UISupportedInterfaceOrientations</key>
    	<array>
    		<string>UIInterfaceOrientationPortrait</string>
    		<string>UIInterfaceOrientationPortraitUpsideDown</string>
    		<string>UIInterfaceOrientationLandscapeLeft</string>
    		<string>UIInterfaceOrientationLandscapeRight</string>
    	</array>
    	<key>CFBundleIcons</key>
    	<dict>
    		<key>CFBundlePrimaryIcon</key>
    		<dict>
    			<key>CFBundleIconFiles</key>
    			<array>
    				<string>Icon-76</string>
    				<string>Icon-76@2x</string>
    				<string>Icon-Small-40</string>
    				<string>Icon-Small-40@2x</string>
    				<string>Icon-Small</string>
    				<string>Icon-Small@2x</string>
    				<string>iTunesArtwork</string>
    				<string>iTunesArtwork@2x</string>
    			</array>
    		</dict>
    	</dict>
    	<key>UILaunchImages</key>
    	<array>
    		<dict>
    			<key>UILaunchImageMinimumOSVersion</key>
    			<string>7.0</string>
    			<key>UILaunchImageName</key>
    			<string>Launch-768x1024-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>Launch-1024x768-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>Launch-1536x2048-portrait</string>
    			<key>UILaunchImageOrientation</key>
    			<string>Portrait</string>
    			<key>UILaunchImageSize</key>
    			<string>{1536, 2048}</string>
    		</dict>
    		<dict>
    			<key>UILaunchImageMinimumOSVersion</key>
    			<string>7.0</string>
    			<key>UILaunchImageName</key>
    			<string>Launch-2048x1536-landscape</string>
    			<key>UILaunchImageOrientation</key>
    			<string>Landscape</string>
    			<key>UILaunchImageSize</key>
    			<string>{1536, 2048}</string>
    		</dict>
    	</array>
    	<key>UILaunchStoryboardName</key>
    	<string>tap_display_launch_screen</string>
    </dict>
    </plist>
    

    The icons are working just fine but no launch images. Here is my project file:

    include(../top_srcdir.pri) # defines top-level source trees
    include(../ace_path.pri)
    
    CONFIG += c++11 link_prl
    
    SETTINGS_BUNDLE_DATA_ROOT.files += Root.plist
    SETTINGS_BUNDLE_DATA_ROOT.path = Settings.bundle
    SETTINGS_BUNDLE_DATA_LANG.files += Root.strings
    SETTINGS_BUNDLE_DATA_LANG.path = Settings.bundle/en.lproj
    QMAKE_BUNDLE_DATA += SETTINGS_BUNDLE_DATA_ROOT SETTINGS_BUNDLE_DATA_LANG
    
    ios {
        QMAKE_INFO_PLIST = tap_display.plist
        ios_icon.files += $$files($$PWD/ios/icons/*.png)
        launch_image.files += tap_display_launch_screen.xib $$files($$PWD/ios/launch-images/*.png)
        QMAKE_BUNDLE_DATA += ios_icon launch_image
    }
    
    QT += qml quick
    INCLUDEPATH += $$aop_util_includes \
                  $$aop_logger_includes \
                  $$tap_data_includes \
                  $$aop_serial_includes \
                  $$tap_messaging_includes \
                  $$aop_data_includes \
                  $$aop_measure_includes \
                  $$aop_interface_includes \
                  $$aop_xml_includes
    
    SOURCES += $$files(*.cpp)
    OBJECTIVE_SOURCES += $$files(*.mm)
    
    HEADERS += $$files(*.hpp) \
               $$files(*.h)
    
    RESOURCES += qml.qrc
    
    macx {
      DEFINES += IOS_BUILD
    }
    
    # Additional import path used to resolve QML modules in Qt Creator's code model
    QML_IMPORT_PATH =
    
    # Default rules for deployment.
    include(deployment.pri)
    
    #target link libraries
    include(../tap_data.pri) # defines tap_data library
    include(../tap_messaging.pri) # defines tap_messaging library
    include(../aop_interface.pri)
    include(../TableLookups.pri)
    include(../WindModel.pri)
    

    The icon files, my .XIB file and my launch image files are all getting copied into the bundle, but again, while the icons work, the launch images do not. All I get is the default screen which displays the app name. I set the deployment target to iOS 7 or greater with no luck, as well as creating my own .XIB file (which I copied from the original). Still no luck.

    Do I need to manually modify the .XIB to incorporate these launch files?

    I would appreciate any help

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TioRoy
      wrote on last edited by
      #2

      @DRoscoe said:

      tap_display_launch_screen.xib

      You need to specify your xib in In your .plist:

      <key>UILaunchStoryboardName</key>
      <string>tap_display_launch_screen</string>
      
      D 1 Reply Last reply
      0
      • T TioRoy

        @DRoscoe said:

        tap_display_launch_screen.xib

        You need to specify your xib in In your .plist:

        <key>UILaunchStoryboardName</key>
        <string>tap_display_launch_screen</string>
        
        D Offline
        D Offline
        DRoscoe
        wrote on last edited by
        #3

        @TioRoy It is there already. Its way at the bottom of the .plist file I posted. The question is, what changes do I need to make to the .xib file?

        T 1 Reply Last reply
        0
        • D DRoscoe

          @TioRoy It is there already. Its way at the bottom of the .plist file I posted. The question is, what changes do I need to make to the .xib file?

          T Offline
          T Offline
          TioRoy
          wrote on last edited by
          #4

          @DRoscoe said:

          @TioRoy It is there already. Its way at the bottom of the .plist file I posted. The question is, what changes do I need to make to the .xib file?

          It's duplicated.

          D 1 Reply Last reply
          0
          • T TioRoy

            @DRoscoe said:

            @TioRoy It is there already. Its way at the bottom of the .plist file I posted. The question is, what changes do I need to make to the .xib file?

            It's duplicated.

            D Offline
            D Offline
            DRoscoe
            wrote on last edited by
            #5

            @TioRoy Ah yes! I got rid of the duplicate, but its still the same issue. I am guessing that the .xib is not properly formed, but I don't know how to add the launch images to the .xib

            T 1 Reply Last reply
            0
            • D DRoscoe

              @TioRoy Ah yes! I got rid of the duplicate, but its still the same issue. I am guessing that the .xib is not properly formed, but I don't know how to add the launch images to the .xib

              T Offline
              T Offline
              TioRoy
              wrote on last edited by
              #6

              @DRoscoe , Unfortunately, you need to edit XIB files with XCode.

              D 1 Reply Last reply
              0
              • T TioRoy

                @DRoscoe , Unfortunately, you need to edit XIB files with XCode.

                D Offline
                D Offline
                DRoscoe
                wrote on last edited by
                #7

                @TioRoy OK, so I need to figure out how to do this in xCode and then capture the resulting .xib file and incorporate it into my .pro file?

                T 1 Reply Last reply
                0
                • D Offline
                  D Offline
                  DRoscoe
                  wrote on last edited by
                  #8

                  Ok, I figured out how to get the images in the XIB. I created a view for each image. It took me a while to figure out I could drag those objects from the lower right corner onto the launch screen view.

                  I can't seem to get the app to figure out which image and orientation to use, so I either added it incorrectly and the app cannot determine it, or I still need to tweak it a bit

                  1 Reply Last reply
                  0
                  • D DRoscoe

                    @TioRoy OK, so I need to figure out how to do this in xCode and then capture the resulting .xib file and incorporate it into my .pro file?

                    T Offline
                    T Offline
                    TioRoy
                    wrote on last edited by
                    #9

                    @DRoscoe

                    If you are using shadow build, you will open XCode project from build directory. So, when you edit .XIB files, you need to copy the .XIB file from build directory to your source directory.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Markus Goetz53
                      wrote on last edited by
                      #10

                      Note that iOS has a bug where it caches old launch screens
                      https://stackoverflow.com/a/35783070

                      1 Reply Last reply
                      1

                      • Login

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