diff --git a/ios/RNCWKWebView.m b/ios/RNCWKWebView.m index 05305c0..abbb74d 100644 --- a/ios/RNCWKWebView.m +++ b/ios/RNCWKWebView.m @@ -426,12 +426,22 @@ static NSURLCredential* clientAuthenticationCredential; NSOperatingSystemVersion iOS_11_3_0 = (NSOperatingSystemVersion){11, 3, 0}; NSOperatingSystemVersion iOS_12_2_0 = (NSOperatingSystemVersion){12, 2, 0}; + NSOperatingSystemVersion iOS_13_0_0 = (NSOperatingSystemVersion){13, 0, 0}; Method method; IMP override; - - if ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion: iOS_12_2_0]) { - // iOS 12.2.0 - Future + + if ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion: iOS_13_0_0]) { + // iOS 13.0.0 - Future + SEL selector = sel_getUid("_elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:"); + method = class_getInstanceMethod(class, selector); + IMP original = method_getImplementation(method); + override = imp_implementationWithBlock(^void(id me, void* arg0, BOOL arg1, BOOL arg2, BOOL arg3, id arg4) { + ((void (*)(id, SEL, void*, BOOL, BOOL, BOOL, id))original)(me, selector, arg0, TRUE, arg2, arg3, arg4); + }); + } + else if ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion: iOS_12_2_0]) { + // iOS 12.2.0 - iOS 13.0.0 SEL selector = sel_getUid("_elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:"); method = class_getInstanceMethod(class, selector); IMP original = method_getImplementation(method);