react-native-webview-bootpay 13.13.43-3.alpha.2 → 13.13.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@
12
12
 
13
13
  using namespace facebook::react;
14
14
 
15
- auto BPStringToOnShouldStartLoadWithRequestNavigationTypeEnum(std::string value) {
15
+ auto bootpayStringToOnShouldStartLoadWithRequestNavigationTypeEnum(std::string value) {
16
16
  if (value == "click") return BPCWebViewEventEmitter::OnShouldStartLoadWithRequestNavigationType::Click;
17
17
  if (value == "formsubmit") return BPCWebViewEventEmitter::OnShouldStartLoadWithRequestNavigationType::Formsubmit;
18
18
  if (value == "backforward") return BPCWebViewEventEmitter::OnShouldStartLoadWithRequestNavigationType::Backforward;
@@ -21,7 +21,7 @@ auto BPStringToOnShouldStartLoadWithRequestNavigationTypeEnum(std::string value)
21
21
  return BPCWebViewEventEmitter::OnShouldStartLoadWithRequestNavigationType::Other;
22
22
  }
23
23
 
24
- auto BPStringToOnLoadingStartNavigationTypeEnum(std::string value) {
24
+ auto bootpayStringToOnLoadingStartNavigationTypeEnum(std::string value) {
25
25
  if (value == "click") return BPCWebViewEventEmitter::OnLoadingStartNavigationType::Click;
26
26
  if (value == "formsubmit") return BPCWebViewEventEmitter::OnLoadingStartNavigationType::Formsubmit;
27
27
  if (value == "backforward") return BPCWebViewEventEmitter::OnLoadingStartNavigationType::Backforward;
@@ -30,7 +30,7 @@ auto BPStringToOnLoadingStartNavigationTypeEnum(std::string value) {
30
30
  return BPCWebViewEventEmitter::OnLoadingStartNavigationType::Other;
31
31
  }
32
32
 
33
- auto BPStringToOnLoadingFinishNavigationTypeEnum(std::string value) {
33
+ auto bootpayStringToOnLoadingFinishNavigationTypeEnum(std::string value) {
34
34
  if (value == "click") return BPCWebViewEventEmitter::OnLoadingFinishNavigationType::Click;
35
35
  if (value == "formsubmit") return BPCWebViewEventEmitter::OnLoadingFinishNavigationType::Formsubmit;
36
36
  if (value == "backforward") return BPCWebViewEventEmitter::OnLoadingFinishNavigationType::Backforward;
@@ -81,7 +81,7 @@ auto BPStringToOnLoadingFinishNavigationTypeEnum(std::string value) {
81
81
  .url = std::string([[dictionary valueForKey:@"url"] UTF8String]),
82
82
  .lockIdentifier = [[dictionary valueForKey:@"lockIdentifier"] doubleValue],
83
83
  .title = std::string([[dictionary valueForKey:@"title"] UTF8String]),
84
- .navigationType = BPStringToOnShouldStartLoadWithRequestNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String])),
84
+ .navigationType = bootpayStringToOnShouldStartLoadWithRequestNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String])),
85
85
  .canGoBack = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
86
86
  .canGoForward = static_cast<bool>([[dictionary valueForKey:@"canGoForward"] boolValue]),
87
87
  .isTopFrame = static_cast<bool>([[dictionary valueForKey:@"isTopFrame"] boolValue]),
@@ -98,7 +98,7 @@ auto BPStringToOnLoadingFinishNavigationTypeEnum(std::string value) {
98
98
  .url = std::string([[dictionary valueForKey:@"url"] UTF8String]),
99
99
  .lockIdentifier = [[dictionary valueForKey:@"lockIdentifier"] doubleValue],
100
100
  .title = std::string([[dictionary valueForKey:@"title"] UTF8String]),
101
- .navigationType = BPStringToOnLoadingStartNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String])),
101
+ .navigationType = bootpayStringToOnLoadingStartNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String])),
102
102
  .canGoBack = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
103
103
  .canGoForward = static_cast<bool>([[dictionary valueForKey:@"canGoForward"] boolValue]),
104
104
  .loading = static_cast<bool>([[dictionary valueForKey:@"loading"] boolValue]),
@@ -146,7 +146,7 @@ auto BPStringToOnLoadingFinishNavigationTypeEnum(std::string value) {
146
146
  .url = std::string([[dictionary valueForKey:@"url"] UTF8String]),
147
147
  .lockIdentifier = [[dictionary valueForKey:@"lockIdentifier"] doubleValue],
148
148
  .title = std::string([[dictionary valueForKey:@"title"] UTF8String]),
149
- .navigationType = BPStringToOnLoadingFinishNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String], [[dictionary valueForKey:@"navigationType"] lengthOfBytesUsingEncoding:NSUTF8StringEncoding])),
149
+ .navigationType = bootpayStringToOnLoadingFinishNavigationTypeEnum(std::string([[dictionary valueForKey:@"navigationType"] UTF8String], [[dictionary valueForKey:@"navigationType"] lengthOfBytesUsingEncoding:NSUTF8StringEncoding])),
150
150
  .canGoBack = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
151
151
  .canGoForward = static_cast<bool>([[dictionary valueForKey:@"canGoForward"] boolValue]),
152
152
  .loading = static_cast<bool>([[dictionary valueForKey:@"loading"] boolValue]),
@@ -36,7 +36,7 @@ shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *)request
36
36
 
37
37
  @end
38
38
 
39
- @interface BPCWeakScriptMessageDelegate : NSObject<WKScriptMessageHandler>
39
+ @interface RNCWeakScriptMessageDelegate : NSObject<WKScriptMessageHandler>
40
40
 
41
41
  @property (nonatomic, weak, nullable) id<WKScriptMessageHandler> scriptDelegate;
42
42
 
@@ -18,20 +18,20 @@
18
18
  #import "objc/runtime.h"
19
19
 
20
20
  static NSTimer *keyboardTimer;
21
- static NSString *const HistoryShimName = @"BPReactNativeHistoryShim";
22
- static NSString *const MessageHandlerName = @"BootpayRNWebView";
21
+ static NSString *const HistoryShimName = @"ReactNativeHistoryShim";
22
+ static NSString *const MessageHandlerName = @"ReactNativeWebView";
23
23
  static NSURLCredential* clientAuthenticationCredential;
24
24
  static NSDictionary* customCertificatesForHost;
25
25
 
26
- NSString *const BPCUSTOM_SELECTOR = @"_BPCUSTOM_SELECTOR_";
26
+ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_";
27
27
 
28
28
  #if TARGET_OS_IOS
29
29
  // runtime trick to remove WKWebView keyboard default toolbar
30
30
  // see: http://stackoverflow.com/questions/19033292/ios-7-uiwebview-keyboard-issue/19042279#19042279
31
- @interface _BPSwizzleHelperWK : UIView
31
+ @interface _SwizzleHelperWK : UIView
32
32
  @property (nonatomic, copy) WKWebView *webView;
33
33
  @end
34
- @implementation _BPSwizzleHelperWK
34
+ @implementation _SwizzleHelperWK
35
35
  -(id)inputAccessoryView
36
36
  {
37
37
  if (_webView == nil) {
@@ -48,13 +48,13 @@ NSString *const BPCUSTOM_SELECTOR = @"_BPCUSTOM_SELECTOR_";
48
48
  @end
49
49
  #endif // TARGET_OS_IOS
50
50
 
51
- @interface BPCWKWebView : WKWebView
51
+ @interface RNCWKWebView : WKWebView
52
52
  #if !TARGET_OS_OSX
53
53
  @property (nonatomic, copy) NSArray<NSDictionary *> * _Nullable menuItems;
54
54
  @property (nonatomic, copy) NSArray<NSString *> * _Nullable suppressMenuItems;
55
55
  #endif // !TARGET_OS_OSX
56
56
  @end
57
- @implementation BPCWKWebView
57
+ @implementation RNCWKWebView
58
58
  #if !TARGET_OS_OSX
59
59
  - (NSString *)stringFromAction:(SEL) action {
60
60
  NSString *sel = NSStringFromSelector(action);
@@ -121,7 +121,7 @@ UIGestureRecognizerDelegate,
121
121
  #endif // !TARGET_OS_OSX
122
122
  RCTAutoInsetsProtocol>
123
123
 
124
- @property (nonatomic, copy) BPCWKWebView *webView;
124
+ @property (nonatomic, copy) RNCWKWebView *webView;
125
125
  @property (nonatomic, strong) WKUserScript *postMessageScript;
126
126
  @property (nonatomic, strong) WKUserScript *injectedObjectJsonScript;
127
127
  @property (nonatomic, strong) WKUserScript *atStartScript;
@@ -280,7 +280,7 @@ RCTAutoInsetsProtocol>
280
280
  for(NSDictionary *menuItem in self.menuItems) {
281
281
  NSString *menuItemLabel = [RCTConvert NSString:menuItem[@"label"]];
282
282
  NSString *menuItemKey = [RCTConvert NSString:menuItem[@"key"]];
283
- NSString *sel = [NSString stringWithFormat:@"%@%@", BPCUSTOM_SELECTOR, menuItemKey];
283
+ NSString *sel = [NSString stringWithFormat:@"%@%@", CUSTOM_SELECTOR, menuItemKey];
284
284
  UIMenuItem *item = [[UIMenuItem alloc] initWithTitle: menuItemLabel
285
285
  action: NSSelectorFromString(sel)];
286
286
  [menuControllerItems addObject: item];
@@ -296,7 +296,7 @@ RCTAutoInsetsProtocol>
296
296
  for(NSDictionary *menuItem in self.menuItems) {
297
297
  NSString *menuItemLabel = [RCTConvert NSString:menuItem[@"label"]];
298
298
  NSString *menuItemKey = [RCTConvert NSString:menuItem[@"key"]];
299
- NSString *sel = [NSString stringWithFormat:@"%@%@", BPCUSTOM_SELECTOR, menuItemKey];
299
+ NSString *sel = [NSString stringWithFormat:@"%@%@", CUSTOM_SELECTOR, menuItemKey];
300
300
  UICommand *command = [UICommand commandWithTitle:menuItemLabel
301
301
  image:nil
302
302
  action:NSSelectorFromString(sel)
@@ -357,7 +357,7 @@ RCTAutoInsetsProtocol>
357
357
  - (void)forwardInvocation:(NSInvocation *)invocation
358
358
  {
359
359
  NSString *sel = NSStringFromSelector([invocation selector]);
360
- NSRange match = [sel rangeOfString:BPCUSTOM_SELECTOR];
360
+ NSRange match = [sel rangeOfString:CUSTOM_SELECTOR];
361
361
  if (match.location == 0) {
362
362
  [self tappedMenuItem:[sel substringFromIndex:17]];
363
363
  } else {
@@ -376,7 +376,7 @@ RCTAutoInsetsProtocol>
376
376
  {
377
377
  NSString *sel = NSStringFromSelector(action);
378
378
  // Do any of them have our custom keys?
379
- NSRange match = [sel rangeOfString:BPCUSTOM_SELECTOR];
379
+ NSRange match = [sel rangeOfString:CUSTOM_SELECTOR];
380
380
 
381
381
  if (match.location == 0) {
382
382
  return YES;
@@ -389,44 +389,20 @@ RCTAutoInsetsProtocol>
389
389
  */
390
390
  - (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures
391
391
  {
392
- if (!navigationAction.targetFrame.isMainFrame) {
393
- NSString *url = navigationAction.request.URL.absoluteString;
394
- if ([url containsString:@"bootpay.co.kr"]) {
395
- // 팝업(새 창) 뜨는 경우 호출됨 (window.open 또는 target="_blank")
396
- WKWebView *popupView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height) configuration:configuration];
397
- [popupView autoresizingMask];
398
- popupView.navigationDelegate = self;
399
- popupView.UIDelegate = self;
400
- [self addSubview:popupView];
401
- return popupView;
402
- } else {
403
- if (_onOpenWindow) {
404
- NSMutableDictionary<NSString *, id> *event = [self baseEvent];
405
- [event addEntriesFromDictionary: @{@"targetUrl": url}];
406
- _onOpenWindow(event);
407
- } else {
408
- [webView loadRequest:navigationAction.request];
409
- }
410
- }
392
+ if (!navigationAction.targetFrame.isMainFrame) {
393
+ NSURL *url = navigationAction.request.URL;
394
+
395
+ if (_onOpenWindow) {
396
+ NSMutableDictionary<NSString *, id> *event = [self baseEvent];
397
+ [event addEntriesFromDictionary: @{@"targetUrl": url.absoluteString}];
398
+ _onOpenWindow(event);
399
+ } else {
400
+ [webView loadRequest:navigationAction.request];
411
401
  }
412
- // if (!navigationAction.targetFrame.isMainFrame) {
413
- // NSURL *url = navigationAction.request.URL;
414
- //
415
- // if (_onOpenWindow) {
416
- // NSMutableDictionary<NSString *, id> *event = [self baseEvent];
417
- // [event addEntriesFromDictionary: @{@"targetUrl": url.absoluteString}];
418
- // _onOpenWindow(event);
419
- // } else {
420
- // [webView loadRequest:navigationAction.request];
421
- // }
422
- // }
402
+ }
423
403
  return nil;
424
404
  }
425
405
 
426
- - (void)webViewDidClose:(WKWebView *)webView {
427
- [webView removeFromSuperview];
428
- }
429
-
430
406
  /**
431
407
  * Enables file input on macos, see https://developer.apple.com/documentation/webkit/wkuidelegate/1641952-webview
432
408
  */
@@ -512,7 +488,7 @@ RCTAutoInsetsProtocol>
512
488
  #endif
513
489
 
514
490
  // Shim the HTML5 history API:
515
- [wkWebViewConfig.userContentController addScriptMessageHandler:[[BPCWeakScriptMessageDelegate alloc] initWithDelegate:self]
491
+ [wkWebViewConfig.userContentController addScriptMessageHandler:[[RNCWeakScriptMessageDelegate alloc] initWithDelegate:self]
516
492
  name:HistoryShimName];
517
493
  [self resetupScripts:wkWebViewConfig];
518
494
 
@@ -540,7 +516,7 @@ RCTAutoInsetsProtocol>
540
516
  {
541
517
  if (self.window != nil && _webView == nil) {
542
518
  WKWebViewConfiguration *wkWebViewConfig = [self setUpWkWebViewConfig];
543
- _webView = [[BPCWKWebView alloc] initWithFrame:self.bounds configuration: wkWebViewConfig];
519
+ _webView = [[RNCWKWebView alloc] initWithFrame:self.bounds configuration: wkWebViewConfig];
544
520
  [self setBackgroundColor: _savedBackgroundColor];
545
521
  #if !TARGET_OS_OSX
546
522
  _webView.menuItems = _menuItems;
@@ -1003,7 +979,7 @@ RCTAutoInsetsProtocol>
1003
979
 
1004
980
  if(subview == nil) return;
1005
981
 
1006
- NSString* name = [NSString stringWithFormat:@"%@_BPSwizzleHelperWK", subview.class.superclass];
982
+ NSString* name = [NSString stringWithFormat:@"%@_SwizzleHelperWK", subview.class.superclass];
1007
983
  Class newClass = NSClassFromString(name);
1008
984
 
1009
985
  if(newClass == nil)
@@ -1011,7 +987,7 @@ RCTAutoInsetsProtocol>
1011
987
  newClass = objc_allocateClassPair(subview.class, [name cStringUsingEncoding:NSASCIIStringEncoding], 0);
1012
988
  if(!newClass) return;
1013
989
 
1014
- Method method = class_getInstanceMethod([_BPSwizzleHelperWK class], @selector(inputAccessoryView));
990
+ Method method = class_getInstanceMethod([_SwizzleHelperWK class], @selector(inputAccessoryView));
1015
991
  class_addMethod(newClass, @selector(inputAccessoryView), method_getImplementation(method), method_getTypeEncoding(method));
1016
992
 
1017
993
  objc_registerClassPair(newClass);
@@ -1025,7 +1001,7 @@ RCTAutoInsetsProtocol>
1025
1001
  UIView* subview;
1026
1002
 
1027
1003
  for (UIView* view in _webView.scrollView.subviews) {
1028
- if([[view.class description] hasSuffix:@"_BPSwizzleHelperWK"])
1004
+ if([[view.class description] hasSuffix:@"_SwizzleHelperWK"])
1029
1005
  subview = view;
1030
1006
  }
1031
1007
 
@@ -1330,25 +1306,6 @@ RCTAutoInsetsProtocol>
1330
1306
  - (void) webView:(WKWebView *)webView
1331
1307
  decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction
1332
1308
  decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
1333
- {
1334
- NSString *url = navigationAction.request.URL.absoluteString;
1335
-
1336
- if([self isItunesURL:url]) {
1337
- [self startAppToApp:[NSURL URLWithString:url]];
1338
- decisionHandler(WKNavigationActionPolicyCancel);
1339
- } else if([url hasPrefix:@"about:blank"]) {
1340
- decisionHandler(WKNavigationActionPolicyAllow);
1341
- } else if(![url hasPrefix:@"http"]) {
1342
- [self startAppToApp:[NSURL URLWithString:url]];
1343
- decisionHandler(WKNavigationActionPolicyCancel);
1344
- } else {
1345
- [self webViewRN:webView decidePolicyForNavigationAction:navigationAction decisionHandler:decisionHandler];
1346
- }
1347
- }
1348
-
1349
- - (void) webViewRN:(WKWebView *)webView
1350
- decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction
1351
- decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
1352
1309
  {
1353
1310
  static NSDictionary<NSNumber *, NSString *> *navigationTypes;
1354
1311
  static dispatch_once_t onceToken;
@@ -1854,7 +1811,7 @@ didFinishNavigation:(WKNavigation *)navigation
1854
1811
  [wkWebViewConfig.userContentController removeScriptMessageHandlerForName:MessageHandlerName];
1855
1812
  if(self.enableApplePay){
1856
1813
  if (self.postMessageScript){
1857
- [wkWebViewConfig.userContentController addScriptMessageHandler:[[BPCWeakScriptMessageDelegate alloc] initWithDelegate:self]
1814
+ [wkWebViewConfig.userContentController addScriptMessageHandler:[[RNCWeakScriptMessageDelegate alloc] initWithDelegate:self]
1858
1815
  name:MessageHandlerName];
1859
1816
  }
1860
1817
  return;
@@ -1945,7 +1902,7 @@ didFinishNavigation:(WKNavigation *)navigation
1945
1902
 
1946
1903
  if(_messagingEnabled){
1947
1904
  if (self.postMessageScript){
1948
- [wkWebViewConfig.userContentController addScriptMessageHandler:[[BPCWeakScriptMessageDelegate alloc] initWithDelegate:self]
1905
+ [wkWebViewConfig.userContentController addScriptMessageHandler:[[RNCWeakScriptMessageDelegate alloc] initWithDelegate:self]
1949
1906
  name:MessageHandlerName];
1950
1907
  [wkWebViewConfig.userContentController addUserScript:self.postMessageScript];
1951
1908
  }
@@ -1982,140 +1939,9 @@ didFinishNavigation:(WKNavigation *)navigation
1982
1939
  return request;
1983
1940
  }
1984
1941
 
1985
- #pragma mark - WebView Javascript
1986
-
1987
- -(void) doJavascript:(NSString*) script {
1988
- [_webView evaluateJavaScript:script completionHandler:nil];
1989
- }
1990
-
1991
- - (void) loadUrl:(NSString*) urlString {
1992
- NSURL *url = [NSURL URLWithString:urlString];
1993
- NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
1994
- [_webView loadRequest:request];
1995
- }
1996
-
1997
- - (void) naverLoginBugFix {
1998
- // if([_beforeUrl hasPrefix:@"naversearchthirdlogin://"]) {
1999
- // NSString* value = [self getQueryStringParameter:_beforeUrl :@"session"];
2000
- // if(value != nil && [value length] > 0) {
2001
- // NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://nid.naver.com/login/scheme.redirect?session=%@", value]];
2002
- // NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
2003
- // [_webView loadRequest:request];
2004
- // }
2005
- // }
2006
- }
2007
-
2008
- - (NSString*) getQueryStringParameter:(NSString*)url :(NSString*)param {
2009
- NSMutableDictionary *queryStringDictionary = [[NSMutableDictionary alloc] init];
2010
- NSArray *urlComponents = [url componentsSeparatedByString:@"&"];
2011
-
2012
- for (NSString *keyValuePair in urlComponents)
2013
- {
2014
- NSArray *pairComponents = [keyValuePair componentsSeparatedByString:@"="];
2015
- NSString *key = [[pairComponents firstObject] stringByRemovingPercentEncoding];
2016
- NSString *value = [[pairComponents lastObject] stringByRemovingPercentEncoding];
2017
-
2018
- if([param isEqualToString:key]) {
2019
- return value;
2020
- }
2021
- }
2022
-
2023
- return @"";
2024
- }
2025
-
2026
- - (void) startAppToApp:(NSURL*) url {
2027
- UIApplication *application = [UIApplication sharedApplication];
2028
-
2029
- if (@available(iOS 10.0, *)) {
2030
- [application openURL:url options:@{} completionHandler: ^(BOOL success) {
2031
- if(success == false) {
2032
- [self startItunesToInstall:url];
2033
- }
2034
- }];
2035
- } else {
2036
- [application openURL:url];
2037
- }
2038
- }
2039
-
2040
-
2041
- - (void) startItunesToInstall:(NSURL*) url {
2042
- NSString *sUrl = url.absoluteString;
2043
- NSString *itunesUrl = @"";
2044
-
2045
- if([sUrl hasPrefix: @"kfc-bankpay"]) {
2046
- itunesUrl = @"https://apps.apple.com/kr/app/%EB%B1%85%ED%81%AC%ED%8E%98%EC%9D%B4-%EA%B8%88%EC%9C%B5%EA%B8%B0%EA%B4%80-%EA%B3%B5%EB%8F%99-%EA%B3%84%EC%A2%8C%EC%9D%B4%EC%B2%B4-%EA%B2%B0%EC%A0%9C-%EC%A0%9C%EB%A1%9C%ED%8E%98%EC%9D%B4/id398456030";
2047
- } else if([sUrl hasPrefix: @"ispmobile"]) {
2048
- itunesUrl = @"https://apps.apple.com/kr/app/isp/id369125087";
2049
- } else if([sUrl hasPrefix: @"hdcardappcardansimclick"] || [sUrl hasPrefix: @"smhyundaiansimclick"]) {
2050
- itunesUrl = @"https://apps.apple.com/kr/app/%ED%98%84%EB%8C%80%EC%B9%B4%EB%93%9C/id702653088";
2051
- } else if([sUrl hasPrefix: @"shinhan-sr-ansimclick"] || [sUrl hasPrefix: @"smshinhanansimclick"]) {
2052
- itunesUrl = @"https://apps.apple.com/kr/app/%EC%8B%A0%ED%95%9C%ED%8E%98%EC%9D%B4%ED%8C%90/id572462317";
2053
- } else if([sUrl hasPrefix: @"kb-acp"]) {
2054
- itunesUrl = @"https://apps.apple.com/kr/app/kb-pay/id695436326";
2055
- } else if([sUrl hasPrefix: @"liivbank"]) {
2056
- itunesUrl = @"https://apps.apple.com/kr/app/%EB%A6%AC%EB%B8%8C/id1126232922";
2057
- } else if([sUrl hasPrefix: @"mpocket.online.ansimclick"] || [sUrl hasPrefix: @"ansimclickscard"] || [sUrl hasPrefix: @"ansimclickipcollect"] || [sUrl hasPrefix: @"samsungpay"] || [sUrl hasPrefix: @"scardcertiapp"]) {
2058
- itunesUrl = @"https://apps.apple.com/kr/app/%EC%82%BC%EC%84%B1%EC%B9%B4%EB%93%9C/id535125356";
2059
- } else if([sUrl hasPrefix: @"lottesmartpay"]) {
2060
- itunesUrl = @"https://apps.apple.com/us/app/%EB%A1%AF%EB%8D%B0%EC%B9%B4%EB%93%9C-%EC%95%B1%EC%B9%B4%EB%93%9C/id688047200";
2061
- } else if([sUrl hasPrefix: @"lotteappcard"]) {
2062
- itunesUrl = @"https://apps.apple.com/kr/app/%EB%94%94%EC%A7%80%EB%A1%9C%EC%B9%B4-%EB%A1%AF%EB%8D%B0%EC%B9%B4%EB%93%9C/id688047200";
2063
- } else if([sUrl hasPrefix: @"newsmartpib"]) {
2064
- itunesUrl = @"https://apps.apple.com/kr/app/%EC%9A%B0%EB%A6%AC-won-%EB%B1%85%ED%82%B9/id1470181651";
2065
- } else if([sUrl hasPrefix: @"com.wooricard.wcard"]) {
2066
- itunesUrl = @"https://apps.apple.com/kr/app/%EC%9A%B0%EB%A6%ACwon%EC%B9%B4%EB%93%9C/id1499598869";
2067
- } else if([sUrl hasPrefix: @"citispay"] || [sUrl hasPrefix: @"citicardappkr"] || [sUrl hasPrefix: @"citimobileapp"]) {
2068
- itunesUrl = @"https://apps.apple.com/kr/app/%EC%94%A8%ED%8B%B0%EB%AA%A8%EB%B0%94%EC%9D%BC/id1179759666";
2069
- } else if([sUrl hasPrefix: @"shinsegaeeasypayment"]) {
2070
- itunesUrl = @"https://apps.apple.com/kr/app/ssgpay/id666237916";
2071
- } else if([sUrl hasPrefix: @"cloudpay"]) {
2072
- itunesUrl = @"https://apps.apple.com/kr/app/%ED%95%98%EB%82%98%EC%B9%B4%EB%93%9C-%EC%9B%90%ED%81%90%ED%8E%98%EC%9D%B4/id847268987";
2073
- } else if([sUrl hasPrefix: @"hanawalletmembers"]) {
2074
- itunesUrl = @"https://apps.apple.com/kr/app/n-wallet/id492190784";
2075
- } else if([sUrl hasPrefix: @"nhappvardansimclick"]) {
2076
- itunesUrl = @"https://apps.apple.com/kr/app/%EC%98%AC%EC%9B%90%ED%8E%98%EC%9D%B4-nh%EC%95%B1%EC%B9%B4%EB%93%9C/id1177889176";
2077
- } else if([sUrl hasPrefix: @"nhallonepayansimclick"] || [sUrl hasPrefix: @"nhappcardansimclick"] || [sUrl hasPrefix: @"nhallonepayansimclick"] || [sUrl hasPrefix: @"nonghyupcardansimclick"]) {
2078
- itunesUrl = @"https://apps.apple.com/kr/app/%EC%98%AC%EC%9B%90%ED%8E%98%EC%9D%B4-nh%EC%95%B1%EC%B9%B4%EB%93%9C/id1177889176";
2079
- } else if([sUrl hasPrefix: @"payco"]) {
2080
- itunesUrl = @"https://apps.apple.com/kr/app/payco/id924292102";
2081
- } else if([sUrl hasPrefix: @"lpayapp"] || [sUrl hasPrefix: @"lmslpay"]) {
2082
- itunesUrl = @"https://apps.apple.com/kr/app/l-point-with-l-pay/id473250588";
2083
- } else if([sUrl hasPrefix: @"naversearchapp"]) {
2084
- itunesUrl = @"https://apps.apple.com/kr/app/%EB%84%A4%EC%9D%B4%EB%B2%84-naver/id393499958";
2085
- } else if([sUrl hasPrefix: @"tauthlink"]) {
2086
- itunesUrl = @"https://apps.apple.com/kr/app/pass-by-skt/id1141258007";
2087
- } else if([sUrl hasPrefix: @"uplusauth"] || [sUrl hasPrefix: @"upluscorporation"] ) {
2088
- itunesUrl = @"https://apps.apple.com/kr/app/pass-by-u/id1147394645";
2089
- } else if([sUrl hasPrefix: @"ktauthexternalcall"]) {
2090
- itunesUrl = @"https://apps.apple.com/kr/app/pass-by-kt/id1134371550";
2091
- } else if([sUrl hasPrefix: @"supertoss"]) {
2092
- itunesUrl = @"https://apps.apple.com/kr/app/%ED%86%A0%EC%8A%A4/id839333328";
2093
- } else if([sUrl hasPrefix: @"kakaotalk"]) {
2094
- itunesUrl = @"https://apps.apple.com/kr/app/kakaotalk/id362057947";
2095
- } else if([sUrl hasPrefix: @"chaipayment"]) {
2096
- itunesUrl = @"https://apps.apple.com/kr/app/%EC%B0%A8%EC%9D%B4/id1459979272";
2097
- } else if([sUrl hasPrefix: @"ukbanksmartbanknonloginpay"]) {
2098
- itunesUrl = @"https://itunes.apple.com/kr/developer/%EC%BC%80%EC%9D%B4%EB%B1%85%ED%81%AC/id1178872626?mt=8";
2099
- } else if([sUrl hasPrefix: @"newliiv"]) {
2100
- itunesUrl = @"https://apps.apple.com/us/app/%EB%A6%AC%EB%B8%8C-next/id1573528126";
2101
- } else if([sUrl hasPrefix: @"kbbank"]) {
2102
- itunesUrl = @"https://apps.apple.com/kr/app/kb%EC%8A%A4%ED%83%80%EB%B1%85%ED%82%B9/id373742138";
2103
- }
2104
-
2105
- if(itunesUrl.length > 0) {
2106
- NSURL *appstore = [NSURL URLWithString: itunesUrl];
2107
- [self startAppToApp: appstore];
2108
- }
2109
- }
2110
-
2111
- - (BOOL) isItunesURL:(NSString*) urlString {
2112
- NSRange match = [urlString rangeOfString: @"itunes.apple.com"];
2113
- return match.location != NSNotFound;
2114
- }
2115
-
2116
1942
  @end
2117
1943
 
2118
- @implementation BPCWeakScriptMessageDelegate
1944
+ @implementation RNCWeakScriptMessageDelegate
2119
1945
 
2120
1946
  - (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate {
2121
1947
  self = [super init];
@@ -4,5 +4,5 @@ export interface Spec extends TurboModule {
4
4
  isFileUploadSupported(): Promise<boolean>;
5
5
  shouldStartLoadWithLockIdentifier(shouldStart: boolean, lockIdentifier: Double): void;
6
6
  }
7
- declare const BPCWebViewModule: Spec;
8
- export default BPCWebViewModule;
7
+ declare const _default: Spec;
8
+ export default _default;
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var nativeModule=null;try{if(_reactNative.TurboModuleRegistry.getEnforcing){nativeModule=_reactNative.TurboModuleRegistry.getEnforcing('BPCWebViewModule');}else if(_reactNative.NativeModules.BPCWebViewModule){nativeModule=_reactNative.NativeModules.BPCWebViewModule;}}catch(error){console.warn('BPCWebViewModule를 찾을 수 없습니다. 더미 구현을 사용합니다.');}var BPCWebViewModule=nativeModule||{isFileUploadSupported:function(){var _isFileUploadSupported=(0,_asyncToGenerator2.default)(function*(){return _reactNative.Platform.OS!=='web';});function isFileUploadSupported(){return _isFileUploadSupported.apply(this,arguments);}return isFileUploadSupported;}(),shouldStartLoadWithLockIdentifier:function shouldStartLoadWithLockIdentifier(){}};var _default=exports.default=BPCWebViewModule;
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _reactNative=require("react-native");var _default=exports.default=_reactNative.TurboModuleRegistry.getEnforcing('BPCWebViewModule');
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "Thibault Malbranche <malbranche.thibault@gmail.com>"
11
11
  ],
12
12
  "license": "MIT",
13
- "version": "13.13.433.alpha.2",
13
+ "version": "13.13.43",
14
14
  "homepage": "https://github.com/react-native-webview/react-native-webview#readme",
15
15
  "scripts": {
16
16
  "android": "react-native run-android",
@@ -54,7 +54,6 @@
54
54
  "@types/invariant": "^2.2.30",
55
55
  "@types/jest": "^29.5.12",
56
56
  "@types/react": "18.2.61",
57
- "@types/react-native": "^0.73.0",
58
57
  "@types/selenium-webdriver": "4.0.9",
59
58
  "appium": "1.17.0",
60
59
  "eslint": "8.57.0",
@@ -1,5 +1,5 @@
1
1
  import type { TurboModule } from 'react-native';
2
- import { TurboModuleRegistry, NativeModules, Platform } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
3
  import { Double } from 'react-native/Libraries/Types/CodegenTypes';
4
4
 
5
5
  export interface Spec extends TurboModule {
@@ -10,23 +10,4 @@ export interface Spec extends TurboModule {
10
10
  ): void;
11
11
  }
12
12
 
13
- // 안전한 모듈 참조 구현
14
- let nativeModule: Spec | null = null;
15
-
16
- try {
17
- if (TurboModuleRegistry.getEnforcing) {
18
- nativeModule = TurboModuleRegistry.getEnforcing<Spec>('BPCWebViewModule');
19
- } else if (NativeModules.BPCWebViewModule) {
20
- nativeModule = NativeModules.BPCWebViewModule as Spec;
21
- }
22
- } catch (error) {
23
- console.warn('BPCWebViewModule를 찾을 수 없습니다. 더미 구현을 사용합니다.');
24
- }
25
-
26
- // 모듈이 없는 경우 더미 구현 제공
27
- const BPCWebViewModule: Spec = nativeModule || {
28
- isFileUploadSupported: async () => Platform.OS !== 'web',
29
- shouldStartLoadWithLockIdentifier: () => {},
30
- };
31
-
32
- export default BPCWebViewModule;
13
+ export default TurboModuleRegistry.getEnforcing<Spec>('BPCWebViewModule');