From ced00b9df9665aa1cd78b523f2c71afdf626d9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= Date: Wed, 7 Aug 2024 12:34:24 -0600 Subject: [PATCH] [ios] Allow location update when app is in background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The app is configured to update the GPS location in the background but this information is not passed to the framework. With this commit the GPS location is passed to the framework even when the app is in background. This results in a higher battery usage if there is an active route but the battery usage will remain the same if no route is active because the GPS location is not updated. Close #6940 Signed-off-by: Fabian Wüthrich --- iphone/Maps/Core/Location/MWMLocationManager.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iphone/Maps/Core/Location/MWMLocationManager.mm b/iphone/Maps/Core/Location/MWMLocationManager.mm index 5e40208862..c7ea911c29 100644 --- a/iphone/Maps/Core/Location/MWMLocationManager.mm +++ b/iphone/Maps/Core/Location/MWMLocationManager.mm @@ -594,7 +594,7 @@ void setShowLocationAlert(BOOL needShow) { { auto app = UIApplication.sharedApplication; auto delegate = static_cast(app.delegate); - if (delegate.isDrapeEngineCreated && app.applicationState == UIApplicationStateActive) + if (delegate.isDrapeEngineCreated) { auto & f = GetFramework(); if (self.frameworkUpdateMode & MWMLocationFrameworkUpdateLocation)