Skip to content

Conversation

@krayc425
Copy link
Contributor

Background

  • On iOS 26, KIF’s current touch injection logic in -tapAtPoint: sometimes fails to trigger taps on non-UIControl views (e.g. UILabel, UIView).
  • The root cause is that KIF reuses the same UIEvent instance for multiple touch phases (Began and Ended).
  • In earlier iOS versions this worked, but starting with iOS 26, it seems like UIKit appears to enforce stricter validation of UIEvent snapshots.
  • From my local testing of my app, if the event does not match the current UITouch phase, the system may ignore the injected event, resulting in taps being dropped.

Changes

  • Update -tapAtPoint: to create a new UIEvent for each touch phase (.began and .ended).
  • Ensure each event is freshly generated from the updated UITouch state before sending.

@krayc425 krayc425 marked this pull request as ready for review September 14, 2025 19:57
Copy link
Contributor

@justinseanmartin justinseanmartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like something that ought to be fairly benign on previous versions. I'll wait on CI results, but should be able to merge this if things looks good.

@justinseanmartin justinseanmartin merged commit ca8ec2e into kif-framework:master Sep 16, 2025
5 checks passed
@justinseanmartin
Copy link
Contributor

Think that there are any other changes needed for iOS26 before cutting a release? It'd be nice to add CI support to validate it and see if anything else is broken. I might be able to get to that later this week.

@krayc425
Copy link
Contributor Author

@justinseanmartin I think the Liquid Glass in the play would break some UI element testings, for example the TabBar / Alert / NavigationBar would have different UX or class hierarchy now. I haven't tested those since my use case doesn't enable Liquid Glass yet, but I think that part is worth an audit and fixes.

@justinseanmartin
Copy link
Contributor

FYI - I cut a release for this fix. Feel free to start using v3.12.2 in place of using master branch or a specific sha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants