diff options
author | Juha Vuolle <juha.vuolle@qt.io> | 2023-03-24 13:57:14 +0200 |
---|---|---|
committer | Juha Vuolle <juha.vuolle@qt.io> | 2023-03-30 13:04:40 +0300 |
commit | 0d1db5eabc9df56c92b1ef836060bf5232524e9e (patch) | |
tree | 132fa07956764b60c2b24effa2443fb0dee82141 /examples/bluetooth/heartrate-server | |
parent | d59db8d3e781e75481480507d36c08568ff4213a (diff) |
Fix .plist when building an example for iOS with CMake
When building an example for iOS with qmake (qt-cmake -GXcode) the
local Info.plists of three of the examples don't work, because they
were using qmake substitutions (${EXECUTABLE_NAME} instead of
${MACOSX_BUNDLE_EXECUTABLE_NAME}), which resulted in "CFBundleExecutable
is not specified".
Instead use shared plist files, each for CMake and qmake.
One of the removed files contained
NSBluetoothPeripheralUsageDescription key, which I think can be
discarded now; it is intended for iOS < 13, and the minimum for Qt 6
is 13.
Pick-to: 6.5
Change-Id: I901dc176c001e25ce88d42b9456b6e16d8f43c20
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'examples/bluetooth/heartrate-server')
-rw-r--r-- | examples/bluetooth/heartrate-server/CMakeLists.txt | 6 | ||||
-rw-r--r-- | examples/bluetooth/heartrate-server/Info.plist | 43 | ||||
-rw-r--r-- | examples/bluetooth/heartrate-server/heartrate-server.pro | 2 |
3 files changed, 4 insertions, 47 deletions
diff --git a/examples/bluetooth/heartrate-server/CMakeLists.txt b/examples/bluetooth/heartrate-server/CMakeLists.txt index b1fa569d..0faca6d8 100644 --- a/examples/bluetooth/heartrate-server/CMakeLists.txt +++ b/examples/bluetooth/heartrate-server/CMakeLists.txt @@ -38,13 +38,13 @@ if(ANDROID OR APPLE) endif() if (APPLE) + # Using absolute path for shared plist files is a Ninja bug workaround + get_filename_component(SHARED_PLIST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../shared ABSOLUTE) if (IOS) set_target_properties(heartrate-server PROPERTIES - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist" + MACOSX_BUNDLE_INFO_PLIST "${SHARED_PLIST_DIR}/Info.cmake.ios.plist" ) else() - # Using absolute path for shared plist files is a Ninja bug workaround - get_filename_component(SHARED_PLIST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../shared ABSOLUTE) set_target_properties(heartrate-server PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${SHARED_PLIST_DIR}/Info.cmake.macos.plist" ) diff --git a/examples/bluetooth/heartrate-server/Info.plist b/examples/bluetooth/heartrate-server/Info.plist deleted file mode 100644 index b50431e8..00000000 --- a/examples/bluetooth/heartrate-server/Info.plist +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDisplayName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundleExecutable</key> - <string>${EXECUTABLE_NAME}</string> - <key>CFBundleIconFile</key> - <string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string> - <key>CFBundleIdentifier</key> - <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> - <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleShortVersionString</key> - <string>${QMAKE_SHORT_VERSION}</string> - <key>CFBundleSignature</key> - <string>${QMAKE_PKGINFO_TYPEINFO}</string> - <key>CFBundleVersion</key> - <string>${QMAKE_FULL_VERSION}</string> - <key>LSRequiresIPhoneOS</key> - <true/> - <key>MinimumOSVersion</key> - <string>${IPHONEOS_DEPLOYMENT_TARGET}</string> - <key>NOTE</key> - <string>This file was generated by Qt/QMake.</string> - <key>NSBluetoothAlwaysUsageDescription</key> - <string>This is Qt's Heartrate server example, it needs your Bluetooth radio!</string> - <key>NSBluetoothPeripheralUsageDescription</key> - <string>Well, this is Qt's Heartrate server, it needs your Bluetooth radio if you don't mind!</string> - <key>UILaunchStoryboardName</key> - <string>LaunchScreen</string> - <key>UISupportedInterfaceOrientations</key> - <array> - <string>UIInterfaceOrientationPortrait</string> - <string>UIInterfaceOrientationPortraitUpsideDown</string> - <string>UIInterfaceOrientationLandscapeLeft</string> - <string>UIInterfaceOrientationLandscapeRight</string> - </array> -</dict> -</plist> diff --git a/examples/bluetooth/heartrate-server/heartrate-server.pro b/examples/bluetooth/heartrate-server/heartrate-server.pro index 800f3f16..56869fd7 100644 --- a/examples/bluetooth/heartrate-server/heartrate-server.pro +++ b/examples/bluetooth/heartrate-server/heartrate-server.pro @@ -8,7 +8,7 @@ CONFIG += console SOURCES += main.cpp -ios: QMAKE_INFO_PLIST = Info.plist +ios: QMAKE_INFO_PLIST = ../shared/Info.qmake.ios.plist macos: QMAKE_INFO_PLIST = ../shared/Info.qmake.macos.plist target.path = $$[QT_INSTALL_EXAMPLES]/bluetooth/heartrate-server |