Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-19447

Qt Creator can "randomly" miss resources when deploying to iOS Simulator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.5.0
    • iOS Support
    • None

    Description

      When Xcode builds a project containing an asset catalog, it checks the Xcode setting  ENABLE_ONLY_ACTIVE_RESOURCES.

      This setting causes Xcode to emit command line options to the asset catalog compiler such as --filter-for-device-model iPad7,4 --filter-for-device-os-version 11.2

      This works fine from within Xcode. However, in Qt Creator builds, the flags passed (since this setting is enabled by default) will NOT necessarily match the simulator device which Qt Creator will deploy into. Therefore you can run into a situation where Qt Creator (by running xcodebuild via make) will build for a 10-inch iPad Pro (2x resolution) while actually deploying into an iPhone X (3x resolution) leading to dropped assets and therefore... not a good situation.

      This happens because the -destination flag which gets passed to xcodebuild points to a device different from the one which Qt Creator will deploy into. Qt Creator needs to pass the DESTINATION_ID variable to make, corresponding to the simulator device it will actually deploy to.

      Unfortunately we can't solve this easily in Qt, because there is no "generic" iOS Simulator device (although the following output looks promising):

      Ineligible destinations for the "XXXX" scheme:
      { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
      { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }

      For now, projects will have to set ENABLE_ONLY_ACTIVE_RESOURCES to NO to work around this issue.

      We might even want to ENABLE_ONLY_ACTIVE_RESOURCES=NO on the xcodebuild command line if no DESTINATION_ID is set, because this is critical to proper builds...

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            con Eike Ziller
            jakepetroules Jake Petroules (DO NOT ASSIGN ISSUES)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes