Qt Positioning Core Location plugin
Overview
The Qt Positioning Core Location plugin wraps native Apple Core Location APIs and provides access to positioning information.
The plugin can be loaded by using the provider name corelocation.
Parameters
The following table lists parameters that can be passed to the Core Location plugin.
| Parameter | Description |
|---|---|
| allowAutoPause | Controls whether the plugin allows the system to pause location updates automatically to save power. The default value is true. This parameter is only relevant on iOS when you enable background location updates. For more details, see Automatic pausing of location updates. |
Automatic pausing of location updates
On iOS, the underlying CLLocationManager can pause location updates automatically to save battery power when location data is unlikely to change.
To prevent the operating system from pausing location updates while the application runs in the background, set the allowAutoPause plugin parameter to false. The plugin then sets the pausesLocationUpdatesAutomatically property of the CLLocationManager instance to NO.
This parameter has an effect only if you enable background location updates. To enable them, add the location value to UIBackgroundModes in the Info.plist file. See Qt Positioning on iOS for details.
Examples
The following examples show how to create a corelocation PositionSource from C++ and QML.
QML
The following snippet creates a PositionSource with no parameters. The plugin uses the default value for allowAutoPause, which is true.
PositionSource {
name: "corelocation"
}The next snippet explicitly adds the allowAutoPause PluginParameter and sets its value to false.
PositionSource {
name: "corelocation"
PluginParameter {
name: "allowAutoPause"
value: false
}
}C++
The following snippet shows how to use C++ to create a position source with allowAutoPause disabled.
QVariantMap params;
params["allowAutoPause"] = false;
QGeoPositionInfoSource *positionSource = QGeoPositionInfoSource::createSource("corelocation", params, this);© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.