-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SwiftUI button being tapped but the click is not registered in XCode 16 beta. #1302
Comments
I would also add that running the tests on the iOS17 simulator from the Xcode 16 beta does work, however running the same test on the iOS18 simulator does not. |
After debugging, I noticed issues with gesture recognizer on the button in the sample repo. If the app is ran on iOS 18 Xcode 16:
Things I tried to fix:
If the app is ran on iOS 17 Xcode 16:
To see the issue:
|
@justinseanmartin @danielbarela Will this issue be fixed any time soon? |
I haven't had time to take a look just yet. If you'd like to dig in and see if you can find a root cause, I'd be happy to help with pointers and guidance and help get it merged. Even setting up an integration test in KIF integration suite would be helpful for having something to use to investigate the issue and verify the fix. EDIT: Sorry, I should've read more closely. I see you did a bunch of your homework here. I'd guess the issue is in how the touch event is being synthesized with the HID event. I'd guess we can diff the touch events being sent from real user input compared to what KIF is doing to synthesize them. I'm not sure when I'll have time to dig in, but that's where I would start. We aren't impacted by this yet, but presumably we will be eventually. |
@justinseanmartin I'm not sure what you mean by |
I have been working on the same exact issue impacting another project and believe I have found the underlying change in iOS 18. As it was my first or second guess as well, I found that it is not related to the HID event. Having in mind that Apple introduced a mechanism for correlating UIKit and SwiftUI gestures - I ended up digging through the disassembled code related to touch instantiation / handling / hit testing. @ispatel22 What @justinseanmartin meant by that is that when tapping/clicking on a real device or simulator the digitizer a HIDEvent is emitted, and it might vary from the event that is created by the KIF code. e.g. In real conditions there is a parent event with transducer type - hand, and it contains another event with transducer type - finger. |
@BartlomiejWlodarczak @justinseanmartin Can I get an update. Has the PR been submitted? |
I haven't seen anything submitted. If @BartlomiejWlodarczak wanted to put up some psuedocode, that might be enough to get it over the line. I haven't spent time on it, as I don't have spare cycles for this right now. |
@BartlomiejWlodarczak I'm unable to find the solution based on your comment. Could you put some pseudo code to point me in the right direction. @justinseanmartin Its been a couple months, but there seems to be no update. Would you be able to point me in the right direction as this issue has been blocking our App. |
UI elements of a SwiftUI view get tapped but are not registered. For example, if there is a button with an accessibility identifier, KIF detects and taps on it, but the button's action method is not getting called. This issue only happens if you run the project on the latest XCode 16 beta. This bug does NOT occur on XCode 15. Below is the link to a sample repo that reproduces the issue.
KIFTapBug repo
The text was updated successfully, but these errors were encountered: