LongPressGesture does not work as expected in Xcode Version 16.0 (16A242) and iOS 18

When I copy and paste example code in apple developer documentation, LongPressGesture does not work as expected in Xcode Version 16.0 (16A242) and iOS 18. It seems updating(_:body:) method does not work when used with LongPressGesture. When I make a breakpoint in updating(_:body:) method and long press the blue circle on the screen of simulator(or device), it is expected to be caught in breakpoint or it is expected that color of circle turns from blue to red to green. However, it is not caught in breakpoint and never turns to red.

Question of Stackoverflow is about same issue and I can not use onLongPressGesture method to implement required feature of my app.

Development environment: Xcode Version 16.0 (16A242), macOS 14.5

Run-time configuration: iOS 18.0

Answered by Engineer in 803606022

Hello @minziikim, please use Feedback Assistant to submit a bug report, and please post here your bug report's ID.

Hello @minziikim, please use Feedback Assistant to submit a bug report, and please post here your bug report's ID.

Same problem.

Version 16.0 (16A242d) macOS 15.0 iOS 18.0

I'm having the same issue. Is this confirmed not to be working? Unfortunately use this in a ton of different spots throughout my app, so this bug makes it un-shippable.

@Engineer Please check FB15127375 . Thank you

Have there been any updates here?

+1 Have the same problem and it's just breaking my app, because the primary action is a long press gesture

Same problem here... unfortunately the app is already deployed on the store and the navigation is not working well... When you press twice, long press gesture starts to work though.

Ive also posted this feedback as FB15275234

This seems to not work still on 18.1, is there an update about this?

I have the same problem. Any news?

LongPressGesture(minimumDuration: duration)
                    .onChanged // does not work
                    .onEnded //works fine

It's really disappointing that there are no regression tests for something as fundamental as LongPressGesture. While the modifier version still seems to work, how are we supposed to combine this gesture in an exclusive or sequenced way? Other than maybe revert to UIKit?

I'm not even referring to the (not-so-random) "Gesture: System gesture gate timed out" log message, which, according to these posts (https://forums.developer.apple.com/forums/thread/764189?answerId=809724022#809724022 https://developer.apple.com/forums/thread/730213 ), should simply be ignored. Easier said than done in this situation...

I really hope SwiftUI is open-sourced someday, for the sanity of us all.

LongPressGesture does not work as expected in Xcode Version 16.0 (16A242) and iOS 18
 
 
Q