Post

Replies

Boosts

Views

Activity

Reply to `onTapGesture` not triggered on `Map` views
Thank you to all above for their help with this. I have managed to get the original single tap and longPressGesture working in my app using the following code. That said, I trust Apple engineers will still resolve the fundamental issue of .onTapGesture not recording a callback. Whilst I am not so concerned about the LongPressGesture, using either spatial or drag inside a simultaneousGesture for what is a single tap feels uncomfortable and a possible future vulnerability... .simultaneousGesture( DragGesture(minimumDistance: 0).onEnded({ value in print("Map tapped") if let coordinate = mapProxy.convert(value.location, from: .local) { self.model.selectedMapLocation = coordinate } DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { if self.model.isShowingMickDescription != true && self.model.isShowingBeaconDescription != true { self.isShowingCreatePinFromMap = true } } }) ) .simultaneousGesture( LongPressGesture().onEnded({ value in print("Long tap gesture") if self.model.nearestPin != nil && self.model.subscribed { self.selectedResult = self.model.nearestPin withAnimation { visibleRegion = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: self.selectedResult!.dispLat, longitude: self.selectedResult!.dispLon), span: .nearestPinSpan) cameraPosition = .region(visibleRegion!) } self.model.cameraPosition = self.cameraPosition // Used in Model to save camera position self.model.isShowingMickDescription = true } }) )
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’25
Reply to Implementing In-App Purchases for the first time
You can test locally with a StoreKit configuration file without submitting to the App Store. I haven't used Sandbox so can't comment on that. You either need to sync the configuration file with appstoreconnect or add them locally to an unsynced config file. The products won't sync unless they are all ready to submit themselves. I found that to get them to this status you had to add a screenshot (any screenshot) and some review notes for each product. Once I did that they changed to a ready to submit status.
Topic: App & System Services SubTopic: StoreKit Tags:
Nov ’24
Reply to `onTapGesture` not triggered on `Map` views
Just to add to my post above. I have changed from using DragGesture to SpatialGesture as a map drag acts as a tap when using this method (if user pans map with single finger).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to `onTapGesture` not triggered on `Map` views
Thank you to all above for their help with this. I have managed to get the original single tap and longPressGesture working in my app using the following code. That said, I trust Apple engineers will still resolve the fundamental issue of .onTapGesture not recording a callback. Whilst I am not so concerned about the LongPressGesture, using either spatial or drag inside a simultaneousGesture for what is a single tap feels uncomfortable and a possible future vulnerability... .simultaneousGesture( DragGesture(minimumDistance: 0).onEnded({ value in print("Map tapped") if let coordinate = mapProxy.convert(value.location, from: .local) { self.model.selectedMapLocation = coordinate } DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { if self.model.isShowingMickDescription != true && self.model.isShowingBeaconDescription != true { self.isShowingCreatePinFromMap = true } } }) ) .simultaneousGesture( LongPressGesture().onEnded({ value in print("Long tap gesture") if self.model.nearestPin != nil && self.model.subscribed { self.selectedResult = self.model.nearestPin withAnimation { visibleRegion = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: self.selectedResult!.dispLat, longitude: self.selectedResult!.dispLon), span: .nearestPinSpan) cameraPosition = .region(visibleRegion!) } self.model.cameraPosition = self.cameraPosition // Used in Model to save camera position self.model.isShowingMickDescription = true } }) )
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to `onTapGesture` not triggered on `Map` views
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.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to Implementing In-App Purchases for the first time
You can test locally with a StoreKit configuration file without submitting to the App Store. I haven't used Sandbox so can't comment on that. You either need to sync the configuration file with appstoreconnect or add them locally to an unsynced config file. The products won't sync unless they are all ready to submit themselves. I found that to get them to this status you had to add a screenshot (any screenshot) and some review notes for each product. Once I did that they changed to a ready to submit status.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Nov ’24