summaryrefslogtreecommitdiffstats
path: root/examples/nfc
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2022-06-01 13:12:54 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2022-06-02 08:48:31 +0300
commitd8a290411ce1b150e91cdda70b6287fd26766d27 (patch)
tree88bca43b51e87b33e7b93d06f8c5fb8a3753ae31 /examples/nfc
parent7f59a76336aef77ca9c233c93b0bb09b7b8e28a1 (diff)
Add NFCReaderUsageDescription key to NFC example apps
The key is needed for iOS applications accessing NFC hardware Change-Id: Icbdd605504b2392934d7edc7f1daa192ffdef1c3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'examples/nfc')
-rw-r--r--examples/nfc/annotatedurl/CMakeLists.txt6
-rw-r--r--examples/nfc/annotatedurl/Info.plist41
-rw-r--r--examples/nfc/annotatedurl/annotatedurl.pro2
-rw-r--r--examples/nfc/ndefeditor/CMakeLists.txt6
-rw-r--r--examples/nfc/ndefeditor/Info.plist41
-rw-r--r--examples/nfc/ndefeditor/ndefeditor.pro2
6 files changed, 98 insertions, 0 deletions
diff --git a/examples/nfc/annotatedurl/CMakeLists.txt b/examples/nfc/annotatedurl/CMakeLists.txt
index 70ad25ab..a0702e5e 100644
--- a/examples/nfc/annotatedurl/CMakeLists.txt
+++ b/examples/nfc/annotatedurl/CMakeLists.txt
@@ -23,6 +23,12 @@ set_target_properties(annotatedurl PROPERTIES
MACOSX_BUNDLE TRUE
)
+if(IOS)
+ set_target_properties(annotatedurl PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
+ )
+endif()
+
target_link_libraries(annotatedurl PUBLIC
Qt::Core
Qt::Gui
diff --git a/examples/nfc/annotatedurl/Info.plist b/examples/nfc/annotatedurl/Info.plist
new file mode 100644
index 00000000..7813167f
--- /dev/null
+++ b/examples/nfc/annotatedurl/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>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</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>NFCReaderUsageDescription</key>
+ <string>Qt's annotatedurl wants to access your NFC hardware</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/nfc/annotatedurl/annotatedurl.pro b/examples/nfc/annotatedurl/annotatedurl.pro
index 8988c526..a9ecf769 100644
--- a/examples/nfc/annotatedurl/annotatedurl.pro
+++ b/examples/nfc/annotatedurl/annotatedurl.pro
@@ -11,6 +11,8 @@ SOURCES += main.cpp \
HEADERS += mainwindow.h \
annotatedurl.h
+ios: QMAKE_INFO_PLIST = Info.plist
+
android {
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
diff --git a/examples/nfc/ndefeditor/CMakeLists.txt b/examples/nfc/ndefeditor/CMakeLists.txt
index c05da2d5..6fab4a85 100644
--- a/examples/nfc/ndefeditor/CMakeLists.txt
+++ b/examples/nfc/ndefeditor/CMakeLists.txt
@@ -26,6 +26,12 @@ set_target_properties(ndefeditor PROPERTIES
MACOSX_BUNDLE TRUE
)
+if(IOS)
+ set_target_properties(ndefeditor PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
+ )
+endif()
+
target_link_libraries(ndefeditor PUBLIC
Qt::Core
Qt::Gui
diff --git a/examples/nfc/ndefeditor/Info.plist b/examples/nfc/ndefeditor/Info.plist
new file mode 100644
index 00000000..b567f11a
--- /dev/null
+++ b/examples/nfc/ndefeditor/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>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</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>NFCReaderUsageDescription</key>
+ <string>Qt's ndefeditor wants to access your NFC hardware</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/nfc/ndefeditor/ndefeditor.pro b/examples/nfc/ndefeditor/ndefeditor.pro
index c653214f..1ab9724a 100644
--- a/examples/nfc/ndefeditor/ndefeditor.pro
+++ b/examples/nfc/ndefeditor/ndefeditor.pro
@@ -17,6 +17,8 @@ HEADERS += \
urirecordeditor.h \
mimeimagerecordeditor.h
+ios: QMAKE_INFO_PLIST = Info.plist
+
FORMS += \
mainwindow.ui \
textrecordeditor.ui \