-
Notifications
You must be signed in to change notification settings - Fork 913
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
Issue #1152: Fix crash in _setIsFirstTouchInView and setIsTap for iOS 14 #1153
Conversation
|
||
// We modify the touchFlags ivar struct directly. | ||
// First entry is _firstTouchForView | ||
Ivar flagsIvar = class_getInstanceVariable(object_getClass(self), "_touchFlags"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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.