mapbox / mapbox/mapbox-maps-ios

Disabling Location Service for map view not working

Open
#2,335 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle:
Dominant language
Swift
Stars
601
Forks
196
PR merge metrics
No merged PRs in 30d

Description

## Environment

- Xcode version: 16.3
- iOS version: 18.0
- Maps SDK Version: 11.12.2

## Observed behavior and steps to reproduce

When moving app to background, we want to stop location updates to save energy.
on previous versions this worked:

locationProvider.removeLocationObserver(for: self)
mapView.location.options.puckType = .none

Now this has no effect, the app is still requesting location updates.

Is there a workaround?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce on Xcode 16.3, iOS 18.0, and Maps SDK 11.12.2 while tracing locationProvider.removeLocationObserver(for:) and mapView.location.options.puckType. Compare the behavior when the app enters the background with the previous SDK behavior; done means location requests stop as intended and the regression is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.