Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 4.5.0
-
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...