Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Taps hit the wrong location after rotation on iPhone Duo when SwiftUI `Map` fills screen by setting .ignoresSafeArea()

Open
#2,452 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the issue with a full-screen SwiftUI Map using .ignoresSafeArea() on an iPhone Duo, then compare behavior after rotation with .ignoresSafeArea(.all, edges: .vertical). The report names Mapbox 11.33.1 and TapInteraction, but no source files or tests; trace how rotation and safe-area changes affect map gesture hit-testing. Done means taps resolve at the touched feature after rotation and single-finger pans remain pans.

Written by the indexing model from the issue text.

Description

auto-triaged bug :beetle: p3 SwiftUI
  • Device: iPhone Duo.
  • iOS: 27.0
  • Mapbox 11.33.1

The setup

The SwiftUI Map is used full-screen (.ignoresSafeArea()), edge to edge, under the status bar and home indicator. It makes use of a symbol layer that registers tap using TapInteraction

Swift

MapReader { proxy in
    Map(viewport: $viewport) {
        // sources / layers
        TapInteraction { context in
            // select the tapped charger feature
            return true
        }
    }
    .presentationTransactionMode(.async)
    .ignoresSafeArea()
}

The issue

  1. Open the app on an iPhone Duo in any orientation. Tapping features works.

  2. Rotate the device.

  3. Taps on features now resolve to the wrong place. A tap about one sidebar-width to the right of a feature opens that feature, and tapping the feature itself does nothing. The offset seems to match the width of the system sidebar when it is shown, however I haven't tested this extensively.

  4. Rotating back doesn't fix it.

  5. Single-finger pans sometimes behave like zoom gestures.

  6. The only recovery is to force quit the app.

Removing .ignoresSafeArea() from the Map makes the problem go away.

Hypothesis

On the iPhone Duo the sidebar is reported as a leading safe-area inset. With .ignoresSafeArea() the map view extends underneath the sidebar. After rotation, the safe-area insets seem to change, but the map's frame or origin used for gesture and feature hit-testing is not updated. Taps are then resolved at points shifted by roughly the sidebar's width. We have not confirmed this in the SDK.

Trying out .ignoresSafeArea(.all, edges: .vertical), seems to fix the issue which suggests that it is caused by the sidebar.

Expected: Taps resolve at the touched point, independent of safe-area or sidebar changes.

Actual: Taps resolve offset by about the sidebar width after rotation.

Dominant language
Swift
Stars
601
Forks
198
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from mapbox/mapbox-maps-ios

All issues in mapbox/mapbox-maps-ios

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.