Details
-
Bug
-
Resolution: Cannot Reproduce
-
P3: Somewhat important
-
None
-
5.12.3, 5.15.0
-
Xcode 10, OSX Mojave
Description
When using QMAKE_INFO_PLIST to specify a custom Info.plist on iOS, variable substitution for the variable QMAKE_FULL_VERSION does not work properly in Xcode.
Attached is a simple Qt Creator generated project, with the following appended to the .pro file:
VERSION=1.2.3
QMAKE_TARGET_BUNDLE_PREFIX="com.testidentifier"
QMAKE_INFO_PLIST=Info.plist
The custom Info.plist included uses the ${QMAKE_FULL_VERSION} variable for substituting the VERSION number.
I build the project from the OSX terminal like this:
export QTDIR=~/Qt5.12.3/5.12.3/
export PATH="$QTDIR/ios/bin/:$PATH"
qmake QmakeInfoPlistTest.pro -spec macx-ios-clang CONFIG+=iphoneos CONFIG+=device CONFIG+=qml_debug && /usr/bin/make qmake_all && make
If I open the generated Debug-iphoneos/QmakeInfoPlistTest.app/Info.plist everything looks correct.
However if I open the generated QmakeInfoPlistTest.xcodeproj in Xcode, I see the text "${QMAKE_FULL_VERSION}" in the Version field under the General tab in the project settings. See the attached screenshot. I would expect to see the value for CFBundleShortVersionString from the Info.plist which is "1.2.3".
Also note that the bundle identifier is correct ("com.testidentifier.QmakeTestInfoPlist" is displayed), so this is variable specific. The bundle identifier comes from Xcode's ${PRODUCT_BUNDLE_IDENTIFIER} so perhaps the bug is specific to QMAKE_* variables whose substitution isn't handled by Xcode.