diff options
author | Sam Bingner <sam@bingner.com> | 2020-06-08 00:14:06 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2020-06-08 00:32:34 -1000 |
commit | 9f14c7183ba72db91bab6a8097a6091cdecef305 (patch) | |
tree | ee29e147cb8d068bee2f17e852f0c1cb1e20d578 | |
parent | 42f0c28ce2b2800a3e93bd7cadd242d5b8a55175 (diff) |
Fix iOS13 crashes with Hardware Keyboard enabledv1.1.34
-rw-r--r-- | CyteKit/WebView.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CyteKit/WebView.mm b/CyteKit/WebView.mm index 9e0cbea..92583f7 100644 --- a/CyteKit/WebView.mm +++ b/CyteKit/WebView.mm @@ -405,6 +405,10 @@ static void $UIWebViewWebViewDelegate$_clearUIWebView(UIWebViewWebViewDelegate * MSHookIvar<UIWebView *>(self, "uiWebView") = nil; } +static BOOL $WAKView$canBecomeFocused(id self) { + return true; +} + __attribute__((__constructor__)) static void $() { if (Class $UIWebViewWebViewDelegate = objc_getClass("UIWebViewWebViewDelegate")) { class_addMethod($UIWebViewWebViewDelegate, @selector(webView:addMessageToConsole:), (IMP) &$UIWebViewWebViewDelegate$webView$addMessageToConsole$, "v16@0:4@8@12"); @@ -416,6 +420,10 @@ __attribute__((__constructor__)) static void $() { class_addMethod($UIWebViewWebViewDelegate, @selector(webViewClose:), (IMP) &$UIWebViewWebViewDelegate$webViewClose$, "v12@0:4@8"); class_addMethod($UIWebViewWebViewDelegate, @selector(_clearUIWebView), (IMP) &$UIWebViewWebViewDelegate$_clearUIWebView, "v8@0:4"); } + if (Class $WAKView = objc_getClass("WAKView")) { + // iOS13 Crashes calling this for unknown reasons when Accessibility->Keyboards->Full Keybaord Access is enabled + class_addMethod($WAKView, @selector(canBecomeFocused), (IMP) &$WAKView$canBecomeFocused, "c@"); + } } @implementation UIWebDocumentView (Cydia) |