diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2021-09-07 12:27:41 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-07 16:49:28 +0000 |
commit | 4dee30dec3926c556342a0d383db3a25b5ecd90f (patch) | |
tree | d1108b1d9a61a985c5232864aabd26a3e88d9bb7 | |
parent | 7768a384e0a4f92a82bd14ea04d76f163e4bb38f (diff) |
Heart-rate example: add a proper Info.plist
Apple (iOS) requires a "proper" Info.plist entries, explaining _why_
we want to use Bluetooth on this particular device. So, let's add it.
Both the server and game apps need it.
Fixes: QTBUG-93991
Change-Id: I09133c6714f30bc402049cd40969a9b9644a0b4f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 0e836b5a8b6d7c659a9540e2718918f8cfc28279)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
4 files changed, 90 insertions, 0 deletions
diff --git a/examples/bluetooth/heartrate-game/Info.plist b/examples/bluetooth/heartrate-game/Info.plist new file mode 100644 index 00000000..d3c8c281 --- /dev/null +++ b/examples/bluetooth/heartrate-game/Info.plist @@ -0,0 +1,43 @@ +<?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>Qt's Heartrate-game needs Bluetooth LE</string> + <key>NSBluetoothPeripheralUsageDescription</key> + <string>Qt's Heartrate-game needs Bluetooth LE</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-game/heartrate-game.pro b/examples/bluetooth/heartrate-game/heartrate-game.pro index fcec0bd2..a0827d89 100644 --- a/examples/bluetooth/heartrate-game/heartrate-game.pro +++ b/examples/bluetooth/heartrate-game/heartrate-game.pro @@ -19,6 +19,8 @@ SOURCES += main.cpp \ devicehandler.cpp \ bluetoothbaseclass.cpp +ios: QMAKE_INFO_PLIST = Info.plist + RESOURCES += qml.qrc \ images.qrc diff --git a/examples/bluetooth/heartrate-server/Info.plist b/examples/bluetooth/heartrate-server/Info.plist new file mode 100644 index 00000000..b50431e8 --- /dev/null +++ b/examples/bluetooth/heartrate-server/Info.plist @@ -0,0 +1,43 @@ +<?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 0333ffc9..992f2d66 100644 --- a/examples/bluetooth/heartrate-server/heartrate-server.pro +++ b/examples/bluetooth/heartrate-server/heartrate-server.pro @@ -7,5 +7,7 @@ CONFIG += c++11 SOURCES += main.cpp +ios: QMAKE_INFO_PLIST = Info.plist + target.path = $$[QT_INSTALL_EXAMPLES]/bluetooth/heartrate-server INSTALLS += target |