mapbox / mapbox/mapbox-maps-ios

Map view is blank after the app is in the background for a long time.

Open
#2,123 21 comments 2 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: 15.1
  • iOS version: 17.2.1, 15.2
  • Devices affected: iPhone 13 promax, iPhone 7 plus
  • Maps SDK Version: 11.1.0

Observed behavior and steps to reproduce

  • Create an app with MapView, configure MBXAccessToken key in project's Info.plist with valid a access token
  • Open the app, the map is loaded successfully
  • Put the app in the background, lock the screen
  • After 1 or 2 days, reopen the app in the foreground, the map is blank
  • Put the app in the background and then reopen it, the map is still blank
  • Close the app, delete it from memory and then reopen it, the map is loaded successfully again

Expected behavior

  • The map should not be blank after the app is in the background for a long time.

Notes / preliminary analysis

Additional links and references

Map blank after the app in background:
map_blank

The issue also occurs with the Example App:
map_blank_ex

https://github.com/mapbox/mapbox-maps-ios/assets/153174406/f326119e-47b6-47df-b31a-cb689fdc7d47

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

Start by reproducing the issue in the Mapbox Example Apps with Maps SDK 11.1.0 on the affected iOS versions, following the background and relaunch steps in the report. Trace the app's background-to-foreground lifecycle around MapView behavior; done means the map renders again after a long background period without force-quitting the app.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.