Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
6.2.0 Beta2
-
None
-
-
b5d833730e758c63cdaf48c584e069bb82e68e38 (qt/qtbase/dev) 38a3f0a33cbbdc011da281cfe8f819c8014355cc (qt/qtbase/6.2)
Description
When building a Qt example CMake project targeting the iOS simulator, Xcode fails to deploy the project to the simulator with the error
The application's Info.plist does not contain CFBundleVersion. Ensure your bundle contains a CFBundleVersion. Failed to install the requested application Domain: NSPOSIXErrorDomain Code: 22 Failure Reason: The application's Info.plist does not contain CFBundleVersion. Recovery Suggestion: Ensure your bundle contains a CFBundleVersion.
There's a similar requirement when targeting a real iOS device.
The bundle version can be specified with the following target properties
MACOSX_BUNDLE_BUNDLE_VERSION MACOSX_BUNDLE_LONG_VERSION_STRING MACOSX_BUNDLE_SHORT_VERSION_STRING
https://cmake.org/cmake/help/latest/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.html
Currently Qt Creator has wizards where these properties are set in the newly generated project.
This is nice, except for the fact that almost none of our pre-existing Qt CMake examples set these properties, so they don't build / launch out of the box.
We should try to augment _qt_internal_finalize_ios_app to set some default version numbers if the user hasn't specified them yet, to make the out-of-the-box iOS experience nicer.
Attachments
Issue Links
- is required for
-
QTBUG-95838 Improve experience of building iOS projects with CMake
- Closed