summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorØystein Heskestad <oystein.heskestad@qt.io>2021-10-04 16:37:18 +0200
committerØystein Heskestad <oystein.heskestad@qt.io>2021-10-07 13:51:32 +0200
commit320cfdadd7ee825052680c8e5109528d671e1072 (patch)
treec9af6995197b3fd3aa8469e9333f3629a4cd8068 /examples
parentadbf48a7812059f273b13d213df6b924137167f0 (diff)
downloadqtlocation-320cfdadd7ee825052680c8e5109528d671e1072.tar.gz
Fix weatherinfo example not requesting location permissions on iOS
Fixes: QTBUG-91377 Change-Id: Id159cd63102269edeebc9096974830d263e18348 Reviewed-by: Lauri Laanmets <lauri.laanmets@eesti.ee> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/positioning/weatherinfo/CMakeLists.txt6
-rw-r--r--examples/positioning/weatherinfo/ios/Info.plist39
-rw-r--r--examples/positioning/weatherinfo/weatherinfo.pro3
3 files changed, 48 insertions, 0 deletions
diff --git a/examples/positioning/weatherinfo/CMakeLists.txt b/examples/positioning/weatherinfo/CMakeLists.txt
index 63e13830..861a0bc5 100644
--- a/examples/positioning/weatherinfo/CMakeLists.txt
+++ b/examples/positioning/weatherinfo/CMakeLists.txt
@@ -67,6 +67,12 @@ qt_add_qml_module(weatherinfo
NO_RESOURCE_TARGET_PATH
)
+if(IOS)
+ set_target_properties(weatherinfo PROPERTIES
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/ios/Info.plist"
+ )
+endif()
+
install(TARGETS weatherinfo
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/positioning/weatherinfo/ios/Info.plist b/examples/positioning/weatherinfo/ios/Info.plist
new file mode 100644
index 00000000..f4929073
--- /dev/null
+++ b/examples/positioning/weatherinfo/ios/Info.plist
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleIdentifier</key>
+ <string>Anonymous.weatherinfo</string>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>CFBundleVersion</key>
+ <string>0.0.1</string>
+ <key>CFBundleShortVersionString</key>
+ <string>0.0.1</string>
+ <key>CFBundleGetInfoString</key>
+ <string></string>
+ <key>NSHumanReadableCopyright</key>
+ <string></string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UILaunchStoryboardName</key>
+ <string>LaunchScreen</string>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>NSLocationWhenInUseUsageDescription</key>
+ <string>Location services needed to give local weather forecast</string>
+</dict>
+</plist>
diff --git a/examples/positioning/weatherinfo/weatherinfo.pro b/examples/positioning/weatherinfo/weatherinfo.pro
index eb88ca42..35f137e0 100644
--- a/examples/positioning/weatherinfo/weatherinfo.pro
+++ b/examples/positioning/weatherinfo/weatherinfo.pro
@@ -19,6 +19,9 @@ OTHER_FILES += weatherinfo.qml \
components/BigForecastIcon.qml \
icons/*
+ios {
+ QMAKE_INFO_PLIST = ios/Info.plist
+}
RESOURCES += weatherinfo.qrc