react-native-webview-bootpay 11.22.81 → 11.22.84

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.
@@ -28,7 +28,7 @@ buildscript {
28
28
  }
29
29
 
30
30
  def getExtOrIntegerDefault(name) {
31
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['ReactNativeWebView_' + name]).toInteger()
31
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['BootpayRNWebView' + name]).toInteger()
32
32
  }
33
33
 
34
34
  apply plugin: 'com.android.library'
@@ -1,6 +1,6 @@
1
- ReactNativeWebView_kotlinVersion=1.3.50
2
- ReactNativeWebView_webkitVersion=1.4.0
3
- ReactNativeWebView_compileSdkVersion=29
4
- ReactNativeWebView_buildToolsVersion=29.0.3
5
- ReactNativeWebView_targetSdkVersion=28
6
- ReactNativeWebView_minSdkVersion=21
1
+ BootpayRNWebView_kotlinVersion=1.3.50
2
+ BootpayRNWebView_webkitVersion=1.4.0
3
+ BootpayRNWebView_compileSdkVersion=29
4
+ BootpayRNWebView_buildToolsVersion=29.0.3
5
+ BootpayRNWebView_targetSdkVersion=28
6
+ BootpayRNWebView_minSdkVersion=21
@@ -37,6 +37,7 @@ shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *_Nonnull)request
37
37
 
38
38
  @interface BPCWebView : RCTView
39
39
 
40
+ @property NSString* beforeUrl;
40
41
  @property (nonatomic, weak) id<BPCWebViewDelegate> _Nullable delegate;
41
42
  @property (nonatomic, copy) NSDictionary * _Nullable source;
42
43
  @property (nonatomic, assign) BOOL messagingEnabled;
@@ -115,4 +116,16 @@ shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *_Nonnull)request
115
116
  - (void)pullToRefresh:(UIRefreshControl *_Nonnull)refreshControl;
116
117
  #endif
117
118
 
119
+ - (void) webViewRN:(WKWebView *)webView
120
+ decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction
121
+ decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler;
122
+
123
+ - (void) doJavascript:(NSString*) script;
124
+ - (void) loadUrl:(NSString*) urlString;
125
+ - (void) naverLoginBugFix;
126
+ - (NSString*) getQueryStringParameter:(NSString*)url :(NSString*)param;
127
+ - (void) startAppToApp:(NSURL*) url;
128
+ - (void) startItunesToInstall:(NSURL*) url;
129
+ - (BOOL) isItunesURL:(NSString*) urlString;
130
+
118
131
  @end
@@ -19,7 +19,9 @@
19
19
 
20
20
  static NSTimer *keyboardTimer;
21
21
  static NSString *const HistoryShimName = @"ReactNativeHistoryShim";
22
- static NSString *const MessageHandlerName = @"ReactNativeWebView";
22
+ // static NSString *const MessageHandlerName = @"ReactNativeWebView";
23
+ static NSString *const MessageHandlerName = @"BootpayRNWebView";
24
+
23
25
  static NSURLCredential* clientAuthenticationCredential;
24
26
  static NSDictionary* customCertificatesForHost;
25
27
 
@@ -28,10 +30,10 @@ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_";
28
30
  #if !TARGET_OS_OSX
29
31
  // runtime trick to remove WKWebView keyboard default toolbar
30
32
  // see: http://stackoverflow.com/questions/19033292/ios-7-uiwebview-keyboard-issue/19042279#19042279
31
- @interface _SwizzleHelperWK : UIView
33
+ @interface _BPSwizzleHelperWK : UIView
32
34
  @property (nonatomic, copy) WKWebView *webView;
33
35
  @end
34
- @implementation _SwizzleHelperWK
36
+ @implementation _BPSwizzleHelperWK
35
37
  -(id)inputAccessoryView
36
38
  {
37
39
  if (_webView == nil) {
@@ -53,9 +55,9 @@ NSString *const CUSTOM_SELECTOR = @"_CUSTOM_SELECTOR_";
53
55
  @end
54
56
  @implementation BPCWKWebView
55
57
  - (void)scrollWheel:(NSEvent *)theEvent {
56
- BPCWebView *rncWebView = (BPCWebView *)[self superview];
57
- RCTAssert([rncWebView isKindOfClass:[rncWebView class]], @"superview must be an BPCWebView");
58
- if (![rncWebView scrollEnabled]) {
58
+ BPCWebView *bpcWebView = (BPCWebView *)[self superview];
59
+ RCTAssert([bpcWebView isKindOfClass:[bpcWebView class]], @"superview must be an BPCWebView");
60
+ if (![bpcWebView scrollEnabled]) {
59
61
  [[self nextResponder] scrollWheel:theEvent];
60
62
  return;
61
63
  }
@@ -309,10 +311,24 @@ RCTAutoInsetsProtocol>
309
311
  */
310
312
  - (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures
311
313
  {
312
- if (!navigationAction.targetFrame.isMainFrame) {
313
- [webView loadRequest:navigationAction.request];
314
- }
315
- return nil;
314
+ // if (!navigationAction.targetFrame.isMainFrame) {
315
+ // [webView loadRequest:navigationAction.request];
316
+ // }
317
+ // return nil;
318
+
319
+ WKWebView *popupView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height) configuration:configuration];
320
+
321
+ [popupView autoresizingMask];
322
+ popupView.navigationDelegate = self;
323
+ popupView.UIDelegate = self;
324
+
325
+ [self addSubview:popupView];
326
+
327
+ return popupView;
328
+ }
329
+
330
+ - (void)webViewDidClose:(WKWebView *)webView {
331
+ [webView removeFromSuperview];
316
332
  }
317
333
 
318
334
  - (WKWebViewConfiguration *)setUpWkWebViewConfig
@@ -819,7 +835,7 @@ RCTAutoInsetsProtocol>
819
835
  newClass = objc_allocateClassPair(subview.class, [name cStringUsingEncoding:NSASCIIStringEncoding], 0);
820
836
  if(!newClass) return;
821
837
 
822
- Method method = class_getInstanceMethod([_SwizzleHelperWK class], @selector(inputAccessoryView));
838
+ Method method = class_getInstanceMethod([_BPSwizzleHelperWK class], @selector(inputAccessoryView));
823
839
  class_addMethod(newClass, @selector(inputAccessoryView), method_getImplementation(method), method_getTypeEncoding(method));
824
840
 
825
841
  objc_registerClassPair(newClass);
@@ -997,7 +1013,7 @@ RCTAutoInsetsProtocol>
997
1013
  {
998
1014
  #if !TARGET_OS_OSX
999
1015
  UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"" message:message preferredStyle:UIAlertControllerStyleAlert];
1000
- [alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
1016
+ [alert addAction:[UIAlertAction actionWithTitle:@"확인" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
1001
1017
  completionHandler();
1002
1018
  }]];
1003
1019
  [[self topViewController] presentViewController:alert animated:YES completion:NULL];
@@ -1016,18 +1032,18 @@ RCTAutoInsetsProtocol>
1016
1032
  - (void)webView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL))completionHandler{
1017
1033
  #if !TARGET_OS_OSX
1018
1034
  UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"" message:message preferredStyle:UIAlertControllerStyleAlert];
1019
- [alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
1035
+ [alert addAction:[UIAlertAction actionWithTitle:@"확인" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
1020
1036
  completionHandler(YES);
1021
1037
  }]];
1022
- [alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
1038
+ [alert addAction:[UIAlertAction actionWithTitle:@"취소" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
1023
1039
  completionHandler(NO);
1024
1040
  }]];
1025
1041
  [[self topViewController] presentViewController:alert animated:YES completion:NULL];
1026
1042
  #else
1027
1043
  NSAlert *alert = [[NSAlert alloc] init];
1028
1044
  [alert setMessageText:message];
1029
- [alert addButtonWithTitle:NSLocalizedString(@"OK", @"OK button")];
1030
- [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Cancel button")];
1045
+ [alert addButtonWithTitle:NSLocalizedString(@"확인", @"OK button")];
1046
+ [alert addButtonWithTitle:NSLocalizedString(@"취소", @"Cancel button")];
1031
1047
  void (^callbacksHandlers)(NSModalResponse response) = ^void(NSModalResponse response) {
1032
1048
  completionHandler(response == NSAlertFirstButtonReturn);
1033
1049
  };
@@ -1044,11 +1060,11 @@ RCTAutoInsetsProtocol>
1044
1060
  [alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
1045
1061
  textField.text = defaultText;
1046
1062
  }];
1047
- UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
1063
+ UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"확인" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
1048
1064
  completionHandler([[alert.textFields lastObject] text]);
1049
1065
  }];
1050
1066
  [alert addAction:okAction];
1051
- UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
1067
+ UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"취소" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
1052
1068
  completionHandler(nil);
1053
1069
  }];
1054
1070
  [alert addAction:cancelAction];
@@ -1067,8 +1083,8 @@ RCTAutoInsetsProtocol>
1067
1083
  textField.stringValue = defaultText;
1068
1084
  [alert setAccessoryView:textField];
1069
1085
 
1070
- [alert addButtonWithTitle:NSLocalizedString(@"OK", @"OK button")];
1071
- [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Cancel button")];
1086
+ [alert addButtonWithTitle:NSLocalizedString(@"확인", @"OK button")];
1087
+ [alert addButtonWithTitle:NSLocalizedString(@"취소", @"Cancel button")];
1072
1088
  [alert beginSheetModalForWindow:[NSApp keyWindow] completionHandler:^(NSModalResponse response) {
1073
1089
  if (response == NSAlertFirstButtonReturn) {
1074
1090
  completionHandler([textField stringValue]);
@@ -1115,11 +1131,37 @@ RCTAutoInsetsProtocol>
1115
1131
 
1116
1132
  #endif // !TARGET_OS_OSX
1117
1133
 
1134
+
1135
+
1136
+ - (void) webView:(WKWebView *)webView
1137
+ decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction
1138
+ decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
1139
+ {
1140
+ NSString *url = navigationAction.request.URL.absoluteString;
1141
+
1142
+ _beforeUrl = url;
1143
+
1144
+ // [self updateBlindViewIfNaverLogin:url];
1145
+
1146
+ if([self isItunesURL:url]) {
1147
+ [self startAppToApp:[NSURL URLWithString:url]];
1148
+ decisionHandler(WKNavigationActionPolicyCancel);
1149
+ } else if([url hasPrefix:@"about:blank"]) {
1150
+ decisionHandler(WKNavigationActionPolicyAllow);
1151
+ } else if(![url hasPrefix:@"http"]) {
1152
+ [self startAppToApp:[NSURL URLWithString:url]];
1153
+ decisionHandler(WKNavigationActionPolicyCancel);
1154
+ } else {
1155
+ decisionHandler(WKNavigationActionPolicyAllow);
1156
+ }
1157
+ }
1158
+
1159
+
1118
1160
  /**
1119
1161
  * Decides whether to allow or cancel a navigation.
1120
1162
  * @see https://fburl.com/42r9fxob
1121
1163
  */
1122
- - (void) webView:(WKWebView *)webView
1164
+ - (void) webViewRN:(WKWebView *)webView
1123
1165
  decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction
1124
1166
  decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
1125
1167
  {
@@ -1641,6 +1683,138 @@ didFinishNavigation:(WKNavigation *)navigation
1641
1683
  return request;
1642
1684
  }
1643
1685
 
1686
+
1687
+ #pragma mark - WebVoew Javascript
1688
+
1689
+ -(void) doJavascript:(NSString*) script {
1690
+ [_webView evaluateJavaScript:script completionHandler:nil];
1691
+ }
1692
+
1693
+ - (void) loadUrl:(NSString*) urlString {
1694
+ NSURL *url = [NSURL URLWithString:urlString];
1695
+ NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
1696
+ [_webView loadRequest:request];
1697
+ }
1698
+
1699
+ - (void) naverLoginBugFix {
1700
+ if([_beforeUrl hasPrefix:@"naversearchthirdlogin://"]) {
1701
+ NSString* value = [self getQueryStringParameter:_beforeUrl :@"session"];
1702
+ if(value != nil && [value length] > 0) {
1703
+ NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://nid.naver.com/login/scheme.redirect?session=%@", value]];
1704
+ NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
1705
+ [_webView loadRequest:request];
1706
+ }
1707
+ }
1708
+ }
1709
+
1710
+ - (NSString*) getQueryStringParameter:(NSString*)url :(NSString*)param {
1711
+ NSMutableDictionary *queryStringDictionary = [[NSMutableDictionary alloc] init];
1712
+ NSArray *urlComponents = [url componentsSeparatedByString:@"&"];
1713
+
1714
+ for (NSString *keyValuePair in urlComponents)
1715
+ {
1716
+ NSArray *pairComponents = [keyValuePair componentsSeparatedByString:@"="];
1717
+ NSString *key = [[pairComponents firstObject] stringByRemovingPercentEncoding];
1718
+ NSString *value = [[pairComponents lastObject] stringByRemovingPercentEncoding];
1719
+
1720
+ if([param isEqualToString:key]) {
1721
+ return value;
1722
+ }
1723
+ }
1724
+
1725
+ return @"";
1726
+ }
1727
+
1728
+ - (void) startAppToApp:(NSURL*) url {
1729
+ UIApplication *application = [UIApplication sharedApplication];
1730
+
1731
+ if (@available(iOS 10.0, *)) {
1732
+ [application openURL:url options:@{} completionHandler: ^(BOOL success) {
1733
+ if(success == false) {
1734
+ [self startItunesToInstall:url];
1735
+ }
1736
+ }];
1737
+ } else {
1738
+ [application openURL:url];
1739
+ }
1740
+ }
1741
+
1742
+
1743
+ - (void) startItunesToInstall:(NSURL*) url {
1744
+ NSString *sUrl = url.absoluteString;
1745
+ NSString *itunesUrl = @"";
1746
+
1747
+ if([sUrl hasPrefix: @"kfc-bankpay"]) {
1748
+ 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";
1749
+ } else if([sUrl hasPrefix: @"ispmobile"]) {
1750
+ itunesUrl = @"https://apps.apple.com/kr/app/isp/id369125087";
1751
+ } else if([sUrl hasPrefix: @"hdcardappcardansimclick"] || [sUrl hasPrefix: @"smhyundaiansimclick"]) {
1752
+ itunesUrl = @"https://apps.apple.com/kr/app/%ED%98%84%EB%8C%80%EC%B9%B4%EB%93%9C/id702653088";
1753
+ } else if([sUrl hasPrefix: @"shinhan-sr-ansimclick"] || [sUrl hasPrefix: @"smshinhanansimclick"]) {
1754
+ itunesUrl = @"https://apps.apple.com/kr/app/%EC%8B%A0%ED%95%9C%ED%8E%98%EC%9D%B4%ED%8C%90/id572462317";
1755
+ } else if([sUrl hasPrefix: @"kb-acp"]) {
1756
+ itunesUrl = @"https://apps.apple.com/kr/app/kb-pay/id695436326";
1757
+ } else if([sUrl hasPrefix: @"liivbank"]) {
1758
+ itunesUrl = @"https://apps.apple.com/kr/app/%EB%A6%AC%EB%B8%8C/id1126232922";
1759
+ } else if([sUrl hasPrefix: @"mpocket.online.ansimclick"] || [sUrl hasPrefix: @"ansimclickscard"] || [sUrl hasPrefix: @"ansimclickipcollect"] || [sUrl hasPrefix: @"samsungpay"] || [sUrl hasPrefix: @"scardcertiapp"]) {
1760
+ itunesUrl = @"https://apps.apple.com/kr/app/%EC%82%BC%EC%84%B1%EC%B9%B4%EB%93%9C/id535125356";
1761
+ } else if([sUrl hasPrefix: @"lottesmartpay"]) {
1762
+ 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";
1763
+ } else if([sUrl hasPrefix: @"lotteappcard"]) {
1764
+ 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";
1765
+ } else if([sUrl hasPrefix: @"newsmartpib"]) {
1766
+ itunesUrl = @"https://apps.apple.com/kr/app/%EC%9A%B0%EB%A6%AC-won-%EB%B1%85%ED%82%B9/id1470181651";
1767
+ } else if([sUrl hasPrefix: @"com.wooricard.wcard"]) {
1768
+ itunesUrl = @"https://apps.apple.com/kr/app/%EC%9A%B0%EB%A6%ACwon%EC%B9%B4%EB%93%9C/id1499598869";
1769
+ } else if([sUrl hasPrefix: @"citispay"] || [sUrl hasPrefix: @"citicardappkr"] || [sUrl hasPrefix: @"citimobileapp"]) {
1770
+ itunesUrl = @"https://apps.apple.com/kr/app/%EC%94%A8%ED%8B%B0%EB%AA%A8%EB%B0%94%EC%9D%BC/id1179759666";
1771
+ } else if([sUrl hasPrefix: @"shinsegaeeasypayment"]) {
1772
+ itunesUrl = @"https://apps.apple.com/kr/app/ssgpay/id666237916";
1773
+ } else if([sUrl hasPrefix: @"cloudpay"]) {
1774
+ 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";
1775
+ } else if([sUrl hasPrefix: @"hanawalletmembers"]) {
1776
+ itunesUrl = @"https://apps.apple.com/kr/app/n-wallet/id492190784";
1777
+ } else if([sUrl hasPrefix: @"nhappvardansimclick"]) {
1778
+ 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";
1779
+ } else if([sUrl hasPrefix: @"nhallonepayansimclick"] || [sUrl hasPrefix: @"nhappcardansimclick"] || [sUrl hasPrefix: @"nhallonepayansimclick"] || [sUrl hasPrefix: @"nonghyupcardansimclick"]) {
1780
+ 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";
1781
+ } else if([sUrl hasPrefix: @"payco"]) {
1782
+ itunesUrl = @"https://apps.apple.com/kr/app/payco/id924292102";
1783
+ } else if([sUrl hasPrefix: @"lpayapp"] || [sUrl hasPrefix: @"lmslpay"]) {
1784
+ itunesUrl = @"https://apps.apple.com/kr/app/l-point-with-l-pay/id473250588";
1785
+ } else if([sUrl hasPrefix: @"naversearchapp"]) {
1786
+ itunesUrl = @"https://apps.apple.com/kr/app/%EB%84%A4%EC%9D%B4%EB%B2%84-naver/id393499958";
1787
+ } else if([sUrl hasPrefix: @"tauthlink"]) {
1788
+ itunesUrl = @"https://apps.apple.com/kr/app/pass-by-skt/id1141258007";
1789
+ } else if([sUrl hasPrefix: @"uplusauth"] || [sUrl hasPrefix: @"upluscorporation"] ) {
1790
+ itunesUrl = @"https://apps.apple.com/kr/app/pass-by-u/id1147394645";
1791
+ } else if([sUrl hasPrefix: @"ktauthexternalcall"]) {
1792
+ itunesUrl = @"https://apps.apple.com/kr/app/pass-by-kt/id1134371550";
1793
+ } else if([sUrl hasPrefix: @"supertoss"]) {
1794
+ itunesUrl = @"https://apps.apple.com/kr/app/%ED%86%A0%EC%8A%A4/id839333328";
1795
+ } else if([sUrl hasPrefix: @"kakaotalk"]) {
1796
+ itunesUrl = @"https://apps.apple.com/kr/app/kakaotalk/id362057947";
1797
+ } else if([sUrl hasPrefix: @"chaipayment"]) {
1798
+ itunesUrl = @"https://apps.apple.com/kr/app/%EC%B0%A8%EC%9D%B4/id1459979272";
1799
+ } else if([sUrl hasPrefix: @"ukbanksmartbanknonloginpay"]) {
1800
+ itunesUrl = @"https://itunes.apple.com/kr/developer/%EC%BC%80%EC%9D%B4%EB%B1%85%ED%81%AC/id1178872626?mt=8";
1801
+ } else if([sUrl hasPrefix: @"newliiv"]) {
1802
+ itunesUrl = @"https://apps.apple.com/us/app/%EB%A6%AC%EB%B8%8C-next/id1573528126";
1803
+ } else if([sUrl hasPrefix: @"kbbank"]) {
1804
+ itunesUrl = @"https://apps.apple.com/kr/app/kb%EC%8A%A4%ED%83%80%EB%B1%85%ED%82%B9/id373742138";
1805
+ }
1806
+
1807
+ if(itunesUrl.length > 0) {
1808
+ NSURL *appstore = [NSURL URLWithString: itunesUrl];
1809
+ [self startAppToApp: appstore];
1810
+ }
1811
+ }
1812
+
1813
+ - (BOOL) isItunesURL:(NSString*) urlString {
1814
+ NSRange match = [urlString rangeOfString: @"itunes.apple.com"];
1815
+ return match.location != NSNotFound;
1816
+ }
1817
+
1644
1818
  @end
1645
1819
 
1646
1820
  @implementation BPCWeakScriptMessageDelegate
@@ -7,7 +7,7 @@
7
7
  <key>BPCWebView.xcscheme_^#shared#^_</key>
8
8
  <dict>
9
9
  <key>orderHint</key>
10
- <integer>2</integer>
10
+ <integer>0</integer>
11
11
  </dict>
12
12
  <key>BPcWebView (iOS).xcscheme_^#shared#^_</key>
13
13
  <dict>
@@ -575,7 +575,7 @@ export interface IOSWebViewProps extends WebViewSharedProps {
575
575
  * if you require to send message to App , webpage has to explicitly call webkit message handler
576
576
  * and receive it on `onMessage` handler on react native side
577
577
  * @example
578
- * window.webkit.messageHandlers.ReactNativeWebView.postMessage("hello apple pay")
578
+ * window.webkit.messageHandlers.BootpayRNWebView.postMessage("hello apple pay")
579
579
  * @platform ios
580
580
  * The default value is false.
581
581
  */
@@ -982,10 +982,10 @@ export interface WebViewSharedProps extends ViewProps {
982
982
  */
983
983
  onNavigationStateChange?: (event: WebViewNavigation) => void;
984
984
  /**
985
- * Function that is invoked when the webview calls `window.ReactNativeWebView.postMessage`.
985
+ * Function that is invoked when the webview calls `window.BootpayRNWebView.postMessage`.
986
986
  * Setting this property will inject this global into your webview.
987
987
  *
988
- * `window.ReactNativeWebView.postMessage` accepts one argument, `data`, which will be
988
+ * `window.BootpayRNWebView.postMessage` accepts one argument, `data`, which will be
989
989
  * available on the event object, `event.nativeEvent.data`. `data` must be a string.
990
990
  */
991
991
  onMessage?: (event: WebViewMessageEvent) => void;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-native-webview-bootpay",
3
3
  "description": "React Native WebView 를 포크떠서 만든 Bootpay WebViewfor iOS, Android, macOS, and Windows",
4
4
  "main": "index.js",
5
- "main-internal": "src/index.ts",
5
+ "main-internal": "index.js",
6
6
  "typings": "index.d.ts",
7
7
  "author": "bootpay <bootpay.co.kr@gmail.com>",
8
8
  "contributors": [
@@ -10,7 +10,7 @@
10
10
  "Thibault Malbranche <malbranche.thibault@gmail.com>"
11
11
  ],
12
12
  "license": "MIT",
13
- "version": "11.22.81",
13
+ "version": "11.22.84",
14
14
  "homepage": "https://www.bootpay.co.kr",
15
15
  "scripts": {
16
16
  "android": "react-native run-android",