Skip to content
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

Issue #1152: Fix crash in _setIsFirstTouchInView and setIsTap for iOS 14 #1153

Merged

Conversation

dostrander
Copy link
Contributor

@dostrander dostrander commented Jun 30, 2020

Fixes Issue #1152

This uses @steipete's fix for iOS 14 crashing outlined here.

I've tested using iOS 14 and earlier iOS versions to make sure this works as intended.

I am currently following the thread here to see if any new information pops up around this and will be investigating this more in the future to see if there is a better longterm solution, however to get folks unblocked this should work for now.

@dostrander dostrander changed the title Issue #1357: Fix crash in _setIsFirstTouchInView and setIsTap for iOS 14 Issue #1153: Fix crash in _setIsFirstTouchInView and setIsTap for iOS 14 Jun 30, 2020
@justinseanmartin justinseanmartin merged commit 945ac4f into kif-framework:master Jun 30, 2020
@justinseanmartin justinseanmartin changed the title Issue #1153: Fix crash in _setIsFirstTouchInView and setIsTap for iOS 14 Issue #1152: Fix crash in _setIsFirstTouchInView and setIsTap for iOS 14 Jun 30, 2020

// We modify the touchFlags ivar struct directly.
// First entry is _firstTouchForView
Ivar flagsIvar = class_getInstanceVariable(object_getClass(self), "_touchFlags");
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we assert that the the ivar exists?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good idea! Given how that code writes into memory, it would corrupt the isa pointer if this is not found.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dostrander ^ making sure you saw this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep added it to the xcode upgrades PR. Going to split some of the issues I found with it up today and early next week and i'll split that one out as well.

ignazioc pushed a commit to technology-ebay-de/KIF that referenced this pull request Sep 18, 2020
vijaytholpadi added a commit to carousell/TTTAttributedLabel that referenced this pull request Aug 22, 2024
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.

4 participants