Skip to content

Instantly share code, notes, and snippets.

@dorentus
Last active May 27, 2021 06:16
Show Gist options
  • Save dorentus/dd72c6cf373495251a5a1fc634036268 to your computer and use it in GitHub Desktop.
Save dorentus/dd72c6cf373495251a5a1fc634036268 to your computer and use it in GitHub Desktop.
Bypass Apple's UIWebView deprecation detection
#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