Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtpositioning-ios.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qtpositioning-ios.html
6
\inmodule QtPositioning
7
\title Qt Positioning on iOS
8
\brief Notes on using Qt Positioning on iOS
9
10
\section1 Using Qt Positioning Services from an iOS App
11
12
To enable an app to use positioning services on an iOS device, entries must
13
be added to the Info.plist file based on whether the positioning services
14
are needed when the app is in use or when the app is running in the
15
background.
16
17
Once the permission is added, the user needs to grant the permission for the
18
positioning services to be available when the app requests the positioning
19
service. The user can change this by going into Settings > Privacy >
20
Location Services, scrolling down to find the app, and selecting an option.
21
The location services must be on for the positioning services to work.
22
23
\section2 Using Foreground Location Services Permission
24
25
If an app makes use of the positioning services when it is running, the
26
Info.plist file needs to have an entry with the key \c
27
NSLocationWhenInUseUsageDescription and a value with a text string giving the
28
user the reason the app makes use of it.
29
30
\badcode
31
<key>NSLocationWhenInUseUsageDescription</key>
32
<string>The reason why the app needs location services</string>
33
\endcode
34
35
\section2 Use Background Location Services Permission
36
37
If the app makes use of location services even when it is running in the
38
background, there needs to be an entry with the key \c
39
NSLocationAlwaysAndWhenInUseUsageDescription and the reason as string value
40
as well as \c NSLocationWhenInUseUsageDescription.
41
42
\badcode
43
<key>NSLocationWhenInUseUsageDescription</key>
44
<string>The reason why the app needs location services</string>
45
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
46
<string>The reason why the app needs location services</string>
47
\endcode
48
49
\note The Info.plist file is automatically generated, and changes made can be
50
overwritten by qmake or CMake unless measures are taken. See
51
\l {Platform Notes - iOS} for more information.
52
53
*/
qtpositioning
src
positioning
doc
src
qtpositioning-ios.qdoc
Generated on Mon Mar 10 2025 01:10:56 for Qt by
1.13.2