`onTapGesture` not triggered on `Map` views

When building with iOS 26 SDK beta 5 (23A5308f), onTapGesture is no longer being triggered on Map views. This appears to be a regression in beta 5 specifically, as this issue was not present in beta 4.

How to reproduce

Code

The following code demonstrates the issue, as seen in the videos below.

import MapKit
import SwiftUI

struct ContentView: View {
  @State private var location = CGPoint.zero

  var body: some View {
    Map()
      .onTapGesture { location in
        self.location = location
      }
      .safeAreaInset(edge: .bottom) {
        VStack(alignment: .center) {
          Text("iOS \(UIDevice.current.systemVersion)")
            .font(.largeTitle)

          Text("Tapped Location")
          Text("\(location.x), \(location.y)")
        }
        .frame(maxWidth: .infinity, alignment: .center)
        .background(.background)
      }
  }
}

Demo

The gifs below show the behavior in iOS 18.5 (in which the tap gestures are recognized and tapped coordinate is displayed in the safe area inset) and iOS 26 beta 5 (in which the tap gestures have no effect):

iOS 18iOS 26

Next steps?

Is there a recommended workaround for this issue?

I've filed FB19405284 describing this bug.

Thank you for filing FB19405284 so we can take a look.

— Ed Ford,  DTS Engineer

Hello, I had the same issue with onTapGesture not being triggered when applied on a struct conforming to UIViewControllerRepresentable. That happens only on iOS 26 Developer Beta 5, not on beta 4.

I can confirm that I'm also experiencing that same issue. I'm happy to provide whatever data I can to debug the issue.

I've also filed FB19394663 which demonstrates the same issue but when Map is wrapped in a MapReader.

I should add that in beta 4 I saw an issue where if I clicked really fast on the map with an onTapGesture interaction modes set to .pan, .zoom, the map eventually stopped responding to everything. With just .pan, it worked just fine, though.

I can also confirm that I am seeing this issue as well when Map view is wrapped in MapReader for iOS 26 (23A5308f))

FYI: I tested this using the new releases published today, and this issue still exists.

Specifically, I observed the issue when:

  • Developing in Xcode beta 6 (17A5305f) running iOS 26 SDK beta 6 (23A5324a) in the simulator
  • Running the sample app on a physical iPhone running iOS 26 beta 7 (23A5326a)

Yes, I can confirm that the issue still exists in Version 26.0 beta 6 (17A5305f) and the iOS 26 SDK beta 6 (23A5324a) in the simulator. Can't understand why it's not fixed :-( Filed a bug (FB19756493)

I can confirm the same in iOS 26 SDK beta 7 when installed on a test device. Deeply frustrating as this has no workaround and is core functionality within our app.

We're still investigating this, but here's something you can try as a workaround: .simultaneousGesture(TapGesture().onEnded {}) to register the callback.

Please let me know how that goes.

— Ed Ford,  DTS Engineer

Thanks so much for that suggestion, @DTS Engineer!

That approach does indeed fire the callback for a tap. But in my particular case, I need the screen coordinate of the tap, and I don't see a way to get that using TapGesture().onEnded {}.

However, I found that SpatialTapGesture does provide the screen coordinate of the tap.

Here's what this workaround looks like applied to the code sample from the OP:

import MapKit
import SwiftUI

struct ContentView: View {
  @State private var location = CGPoint.zero

  var body: some View {
    Map()
      .simultaneousGesture(SpatialTapGesture()
        .onEnded { event in
          self.location = event.location
        }
      ).safeAreaInset(edge: .bottom) {
        VStack(alignment: .center) {
          Text("iOS \(UIDevice.current.systemVersion)")
            .font(.largeTitle)

          Text("Tapped Location")
          Text("\(location.x), \(location.y)")
        }
        .frame(maxWidth: .infinity, alignment: .center)
        .background(.background)
      }
  }
}

That seems to work well in my testing!

I'll adopt this workaround for now. Thanks for your help!


Docs:

`onTapGesture` not triggered on `Map` views
 
 
Q