Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.4.2
-
None
-
MacOS 12.6 on M1 Apple Silicon, Qt Creator 9.0.1, Qt 6.4.2, Apple clang version 13.1.6 (clang-1316.0.21.2.5), XCode 13.4.1
Description
In order to troubleshoot issues I've been having with building an iOS app using Qt 6 + CMake, I've stripped right back to a bare bones app, but even here there are problems.
To reproduce:
- In Qt Creator, New Project... > Qt Quick Application
- Name it qt6-cmake-ios and choose the CMake build system
- Select Qt 6.4.2 for iOS kit
- Select Release build type and run CMake
- In Finder, locate the build folder and open qt6-cmake-ios.xcodeproj which opens the project in Xcode.
- As per your documentation, there is a problem with CMake regarding building of archives and it is necessary to build the project before generating the archive. (What the documentation doesn't make clear is that specifically the Release build must be built before generating the archive, otherwise the Release-iphoneos folders don't get built.)
So, in Xcode go to Product > Scheme > Edit Scheme... - Select the appqt6-cmake-ios scheme and the target Any iOS device (arm64)
- For Run (on the left) select Release build configuration.
- Close the dialog and go to Product > Build For > Running
This fails.
There is 1 warning:
User-supplied CFBundleIdentifier value 'my.example.com' in the Info.plist must be the same as the PRODUCT_BUNDLE_IDENTIFIER build setting value ''. (in target 'appqt6-cmake-ios' from project 'qt6-cmake-ios')
Why is this? And does it matter? I can see that within Build settings > Packaging none of the bundle details have come through although they are visible under General and Info.
There are also lots of link errors:
These look to me like certain frameworks have not been included. (Remember I have built the autogenerated project which includes the default code for including setting target properties such as MACOSX_BUNDLE.)
NB: As a sidenote, I see that regardless of the build type (Debug/Release/etc), for iOS it's always the same build directory build-qt6-cmake-ios-Qt_6_4_2_for_iOS with no -<buildtype> suffix. Is that intentional? And does it matter?