Skip to content

Commit 097b81b

Browse files
committed
alias update
1 parent dca2549 commit 097b81b

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

apple/BPCWebViewImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *)request
3636

3737
@end
3838

39-
@interface RNCWeakScriptMessageDelegate : NSObject<WKScriptMessageHandler>
39+
@interface BPCWeakScriptMessageDelegate : NSObject<WKScriptMessageHandler>
4040

4141
@property (nonatomic, weak, nullable) id<WKScriptMessageHandler> scriptDelegate;
4242

apple/BPCWebViewImpl.m

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#if TARGET_OS_IOS
2929
// runtime trick to remove WKWebView keyboard default toolbar
3030
// see: http://stackoverflow.com/questions/19033292/ios-7-uiwebview-keyboard-issue/19042279#19042279
31-
@interface _SwizzleHelperWK : UIView
31+
@interface _BPSwizzleHelperWK : UIView
3232
@property (nonatomic, copy) WKWebView *webView;
3333
@end
34-
@implementation _SwizzleHelperWK
34+
@implementation _BPSwizzleHelperWK
3535
-(id)inputAccessoryView
3636
{
3737
if (_webView == nil) {
@@ -48,13 +48,13 @@ -(id)inputAccessoryView
4848
@end
4949
#endif // TARGET_OS_IOS
5050

51-
@interface RNCWKWebView : WKWebView
51+
@interface BPCWKWebView : WKWebView
5252
#if !TARGET_OS_OSX
5353
@property (nonatomic, copy) NSArray<NSDictionary *> * _Nullable menuItems;
5454
@property (nonatomic, copy) NSArray<NSString *> * _Nullable suppressMenuItems;
5555
#endif // !TARGET_OS_OSX
5656
@end
57-
@implementation RNCWKWebView
57+
@implementation BPCWKWebView
5858
#if !TARGET_OS_OSX
5959
- (NSString *)stringFromAction:(SEL) action {
6060
NSString *sel = NSStringFromSelector(action);
@@ -121,7 +121,7 @@ @interface BPCWebViewImpl () <WKUIDelegate, WKNavigationDelegate, WKScriptMessag
121121
#endif // !TARGET_OS_OSX
122122
RCTAutoInsetsProtocol>
123123

124-
@property (nonatomic, copy) RNCWKWebView *webView;
124+
@property (nonatomic, copy) BPCWKWebView *webView;
125125
@property (nonatomic, strong) WKUserScript *postMessageScript;
126126
@property (nonatomic, strong) WKUserScript *injectedObjectJsonScript;
127127
@property (nonatomic, strong) WKUserScript *atStartScript;
@@ -512,7 +512,7 @@ - (WKWebViewConfiguration *)setUpWkWebViewConfig
512512
#endif
513513

514514
// Shim the HTML5 history API:
515-
[wkWebViewConfig.userContentController addScriptMessageHandler:[[RNCWeakScriptMessageDelegate alloc] initWithDelegate:self]
515+
[wkWebViewConfig.userContentController addScriptMessageHandler:[[BPCWeakScriptMessageDelegate alloc] initWithDelegate:self]
516516
name:HistoryShimName];
517517
[self resetupScripts:wkWebViewConfig];
518518

@@ -540,7 +540,7 @@ - (void)didMoveToWindow
540540
{
541541
if (self.window != nil && _webView == nil) {
542542
WKWebViewConfiguration *wkWebViewConfig = [self setUpWkWebViewConfig];
543-
_webView = [[RNCWKWebView alloc] initWithFrame:self.bounds configuration: wkWebViewConfig];
543+
_webView = [[BPCWKWebView alloc] initWithFrame:self.bounds configuration: wkWebViewConfig];
544544
[self setBackgroundColor: _savedBackgroundColor];
545545
#if !TARGET_OS_OSX
546546
_webView.menuItems = _menuItems;
@@ -1003,15 +1003,15 @@ -(void)setHideKeyboardAccessoryView:(BOOL)hideKeyboardAccessoryView
10031003

10041004
if(subview == nil) return;
10051005

1006-
NSString* name = [NSString stringWithFormat:@"%@_SwizzleHelperWK", subview.class.superclass];
1006+
NSString* name = [NSString stringWithFormat:@"%@_BPSwizzleHelperWK", subview.class.superclass];
10071007
Class newClass = NSClassFromString(name);
10081008

10091009
if(newClass == nil)
10101010
{
10111011
newClass = objc_allocateClassPair(subview.class, [name cStringUsingEncoding:NSASCIIStringEncoding], 0);
10121012
if(!newClass) return;
10131013

1014-
Method method = class_getInstanceMethod([_SwizzleHelperWK class], @selector(inputAccessoryView));
1014+
Method method = class_getInstanceMethod([_BPSwizzleHelperWK class], @selector(inputAccessoryView));
10151015
class_addMethod(newClass, @selector(inputAccessoryView), method_getImplementation(method), method_getTypeEncoding(method));
10161016

10171017
objc_registerClassPair(newClass);
@@ -1025,7 +1025,7 @@ - (void)__addInputAccessoryView {
10251025
UIView* subview;
10261026

10271027
for (UIView* view in _webView.scrollView.subviews) {
1028-
if([[view.class description] hasSuffix:@"_SwizzleHelperWK"])
1028+
if([[view.class description] hasSuffix:@"_BPSwizzleHelperWK"])
10291029
subview = view;
10301030
}
10311031

@@ -1854,7 +1854,7 @@ - (void)resetupScripts:(WKWebViewConfiguration *)wkWebViewConfig {
18541854
[wkWebViewConfig.userContentController removeScriptMessageHandlerForName:MessageHandlerName];
18551855
if(self.enableApplePay){
18561856
if (self.postMessageScript){
1857-
[wkWebViewConfig.userContentController addScriptMessageHandler:[[RNCWeakScriptMessageDelegate alloc] initWithDelegate:self]
1857+
[wkWebViewConfig.userContentController addScriptMessageHandler:[[BPCWeakScriptMessageDelegate alloc] initWithDelegate:self]
18581858
name:MessageHandlerName];
18591859
}
18601860
return;
@@ -1945,7 +1945,7 @@ - (void)resetupScripts:(WKWebViewConfiguration *)wkWebViewConfig {
19451945

19461946
if(_messagingEnabled){
19471947
if (self.postMessageScript){
1948-
[wkWebViewConfig.userContentController addScriptMessageHandler:[[RNCWeakScriptMessageDelegate alloc] initWithDelegate:self]
1948+
[wkWebViewConfig.userContentController addScriptMessageHandler:[[BPCWeakScriptMessageDelegate alloc] initWithDelegate:self]
19491949
name:MessageHandlerName];
19501950
[wkWebViewConfig.userContentController addUserScript:self.postMessageScript];
19511951
}
@@ -2115,7 +2115,7 @@ - (BOOL) isItunesURL:(NSString*) urlString {
21152115

21162116
@end
21172117

2118-
@implementation RNCWeakScriptMessageDelegate
2118+
@implementation BPCWeakScriptMessageDelegate
21192119

21202120
- (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate {
21212121
self = [super init];

0 commit comments

Comments
 (0)