summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2021-09-07 12:27:41 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2021-10-29 13:24:46 +0200
commit17b6f09eb4bf024ced0a0fa3e5bb918f739e2ebf (patch)
tree0a1a8b72e069b41f5d559161d53bc9e05239f8fe
parent0f715bf740a5a3f531c7e0d59be1c00a2a08129f (diff)
downloadqtconnectivity-17b6f09eb4bf024ced0a0fa3e5bb918f739e2ebf.tar.gz
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. Task-number: QTBUG-93991 Change-Id: I09133c6714f30bc402049cd40969a9b9644a0b4f Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 0e836b5a8b6d7c659a9540e2718918f8cfc28279) Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r--examples/bluetooth/heartrate-game/Info.plist41
-rw-r--r--examples/bluetooth/heartrate-game/heartrate-game.pro2
-rw-r--r--examples/bluetooth/heartrate-server/Info.plist41
-rw-r--r--examples/bluetooth/heartrate-server/heartrate-server.pro2
4 files changed, 86 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..89820408
--- /dev/null
+++ b/examples/bluetooth/heartrate-game/Info.plist
@@ -0,0 +1,41 @@
+<?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>NSBluetoothAlwaysUsageDescription</key>
+ <string>Qt&apos;s Heartrate-game needs Bluetooth LE</string>
+ <key>NSBluetoothPeripheralUsageDescription</key>
+ <string>Qt&apos;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..dd42d76e
--- /dev/null
+++ b/examples/bluetooth/heartrate-server/Info.plist
@@ -0,0 +1,41 @@
+<?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>NSBluetoothAlwaysUsageDescription</key>
+ <string>This is Qt&apos;s Heartrate server example, it needs your Bluetooth radio!</string>
+ <key>NSBluetoothPeripheralUsageDescription</key>
+ <string>Well, this is Qt&apos;s Heartrate server, it needs your Bluetooth radio if you don&apos;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