Last active
May 27, 2021 06:16
-
-
Save dorentus/dd72c6cf373495251a5a1fc634036268 to your computer and use it in GitHub Desktop.
Bypass Apple's UIWebView deprecation detection
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
#import <Foundation/Foundation.h> | |
#import <dlfcn.h> | |
@interface UIWebView : NSObject | |
@end | |
@implementation UIWebView | |
+ (id)alloc | |
{ | |
static Class cls; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
cls = (__bridge Class)(dlsym(RTLD_NEXT, "OBJC_CLASS_$_UIWebView")); | |
}); | |
return [cls alloc]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment