You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed a crash when using ClippingScrollViewDecorator (KeyboardAwareScrollView/KeyboardChatScrollView) in MacCatalyst apps.
💡 Motivation and Context
That crash happens because we try to exchange of methods that don't exist in MacCatalyst implementation. When we run this code the UIKit gets backed by AppKit and mobile-specific methods don't exist. The fix is very simple - for mac catalyst we don't need to exchange the implementations of methods that don't exist.
UIScrollView dynamic subclassing issue on macOS Catalyst Why: The code skips applying patches on macOS Catalyst due to AppKit-backed views but doesn't handle reverting existing subclasses if they were applied before, potentially causing runtime errors when UIScrollView instances are recreated. Fix: Add logic to revert the class changes when views move to a different environment or implement safeguards to prevent subclassing on AppKit-backed views.
Missing handling of existing patched classes Why: The current code doesn't check if the UIScrollView has already been patched, leading to potential issues with multiple initializations or state mismatches post-patch. Fix: Implement a mechanism to detect and clean up any existing patched classes when the environment changes or views are reinitialized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Fixed a crash when using
ClippingScrollViewDecorator(KeyboardAwareScrollView/KeyboardChatScrollView) in MacCatalyst apps.💡 Motivation and Context
That crash happens because we try to exchange of methods that don't exist in MacCatalyst implementation. When we run this code the UIKit gets backed by AppKit and mobile-specific methods don't exist. The fix is very simple - for mac catalyst we don't need to exchange the implementations of methods that don't exist.
Fix: #1454
📢 Changelog
iOS
🤔 How Has This Been Tested?
Tested in example catalyst app:
📸 Screenshots (if appropriate):
📝 Checklist