react-native-webview-bootpay 11.18.12 → 11.18.13

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.
Files changed (2) hide show
  1. package/apple/BPCWebView.m +91 -52
  2. package/package.json +1 -1
@@ -985,73 +985,112 @@ static NSDictionary* customCertificatesForHost;
985
985
  }
986
986
 
987
987
 
988
- - (BOOL) isItunesURL:(NSString*) url {
989
- NSString *itunesRegexp = @"\\/\\/itunes\\.apple\\.com\\/";
990
- NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", itunesRegexp];
991
- return [predicate evaluateWithObject: url];
988
+ - (NSString*) getQueryStringParameter:(NSString*)url :(NSString*)param {
989
+ NSMutableDictionary *queryStringDictionary = [[NSMutableDictionary alloc] init];
990
+ NSArray *urlComponents = [url componentsSeparatedByString:@"&"];
991
+
992
+ for (NSString *keyValuePair in urlComponents)
993
+ {
994
+ NSArray *pairComponents = [keyValuePair componentsSeparatedByString:@"="];
995
+ NSString *key = [[pairComponents firstObject] stringByRemovingPercentEncoding];
996
+ NSString *value = [[pairComponents lastObject] stringByRemovingPercentEncoding];
997
+
998
+ if([param isEqualToString:key]) {
999
+ return value;
1000
+ }
1001
+ }
1002
+
1003
+ return @"";
992
1004
  }
993
1005
 
994
- - (void) goInstallApp:(WKNavigationAction *)navigationAction {
995
- NSString * url = navigationAction.request.URL.absoluteString;
996
- NSString * itunesUrl = @"";
997
- if([url hasPrefix:@"kftc-bankpay"]) {
1006
+ - (void) startAppToApp:(NSURL*) url {
1007
+ UIApplication *application = [UIApplication sharedApplication];
1008
+
1009
+ // if (@available(iOS 10.0, *)) {
1010
+ // [application openURL:url options:@{} completionHandler:nil];
1011
+ // } else {
1012
+ // [application openURL:url];
1013
+ // }
1014
+
1015
+ if (@available(iOS 10.0, *)) {
1016
+ [application openURL:url options:@{} completionHandler: ^(BOOL success) {
1017
+ if(success == false) {
1018
+ [self startItunesToInstall:url];
1019
+ }
1020
+ }];
1021
+ } else {
1022
+ [application openURL:url];
1023
+ }
1024
+ }
1025
+
1026
+
1027
+ - (void) startItunesToInstall:(NSURL*) url {
1028
+ NSString *sUrl = url.absoluteString;
1029
+ NSString *itunesUrl = @"";
1030
+
1031
+ if([sUrl hasPrefix: @"kfc-bankpay"]) {
998
1032
  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";
999
- } else if([url hasPrefix:@"ispmobile"]) {
1000
- itunesUrl = @"https://apps.apple.com/kr/app/isp-%ED%8E%98%EC%9D%B4%EB%B6%81/id369125087";
1001
- } else if([url hasPrefix:@"hdcardappcardansimclick"]) {
1033
+ } else if([sUrl hasPrefix: @"ispmobile"]) {
1034
+ itunesUrl = @"https://apps.apple.com/kr/app/isp/id369125087";
1035
+ } else if([sUrl hasPrefix: @"hdcardappcardansimclick"] || [sUrl hasPrefix: @"smhyundaiansimclick"]) {
1002
1036
  itunesUrl = @"https://apps.apple.com/kr/app/%ED%98%84%EB%8C%80%EC%B9%B4%EB%93%9C/id702653088";
1003
- } else if([url hasPrefix:@"shinhan-sr-ansimclick"]) {
1037
+ } else if([sUrl hasPrefix: @"shinhan-sr-ansimclick"] || [sUrl hasPrefix: @"smshinhanansimclick"]) {
1004
1038
  itunesUrl = @"https://apps.apple.com/kr/app/%EC%8B%A0%ED%95%9C%ED%8E%98%EC%9D%B4%ED%8C%90/id572462317";
1005
- } else if([url hasPrefix:@"kb-acp"]) {
1039
+ } else if([sUrl hasPrefix: @"kb-acp"]) {
1006
1040
  itunesUrl = @"https://apps.apple.com/kr/app/kb-pay/id695436326";
1007
- } else if([url hasPrefix:@"mpocket.online.ansimclick"]) {
1041
+ } else if([sUrl hasPrefix: @"liivbank"]) {
1042
+ itunesUrl = @"https://apps.apple.com/kr/app/%EB%A6%AC%EB%B8%8C/id1126232922";
1043
+ } else if([sUrl hasPrefix: @"mpocket.online.ansimclick"] || [sUrl hasPrefix: @"ansimclickscard"] || [sUrl hasPrefix: @"ansimclickipcollect"] || [sUrl hasPrefix: @"samsungpay"] || [sUrl hasPrefix: @"scardcertiapp"]) {
1008
1044
  itunesUrl = @"https://apps.apple.com/kr/app/%EC%82%BC%EC%84%B1%EC%B9%B4%EB%93%9C/id535125356";
1009
- } else if([url hasPrefix:@"lottesmartpay"]) {
1010
- 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";
1011
- } else if([url hasPrefix:@"lotteappcard"]) {
1045
+ } else if([sUrl hasPrefix: @"lottesmartpay"]) {
1012
1046
  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";
1013
- } else if([url hasPrefix:@"cloudpay"]) {
1014
- itunesUrl = @"https://apps.apple.com/kr/app/%ED%95%98%EB%82%98%EC%9B%90%ED%81%90-%EC%B9%B4%EB%93%9C-%ED%95%98%EB%82%98%EC%B9%B4%EB%93%9C/id427543371";
1015
- } else if([url hasPrefix:@"nhappvardansimclick"]) {
1047
+ } else if([sUrl hasPrefix: @"lotteappcard"]) {
1048
+ 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";
1049
+ } else if([sUrl hasPrefix: @"newsmartpib"]) {
1050
+ itunesUrl = @"https://apps.apple.com/kr/app/%EC%9A%B0%EB%A6%AC-won-%EB%B1%85%ED%82%B9/id1470181651";
1051
+ } else if([sUrl hasPrefix: @"com.wooricard.wcard"]) {
1052
+ itunesUrl = @"https://apps.apple.com/kr/app/%EC%9A%B0%EB%A6%ACwon%EC%B9%B4%EB%93%9C/id1499598869";
1053
+ } else if([sUrl hasPrefix: @"citispay"] || [sUrl hasPrefix: @"citicardappkr"] || [sUrl hasPrefix: @"citimobileapp"]) {
1054
+ itunesUrl = @"https://apps.apple.com/kr/app/%EC%94%A8%ED%8B%B0%EB%AA%A8%EB%B0%94%EC%9D%BC/id1179759666";
1055
+ } else if([sUrl hasPrefix: @"shinsegaeeasypayment"]) {
1056
+ itunesUrl = @"https://apps.apple.com/kr/app/ssgpay/id666237916";
1057
+ } else if([sUrl hasPrefix: @"cloudpay"]) {
1058
+ 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";
1059
+ } else if([sUrl hasPrefix: @"hanawalletmembers"]) {
1060
+ itunesUrl = @"https://apps.apple.com/kr/app/n-wallet/id492190784";
1061
+ } else if([sUrl hasPrefix: @"nhappvardansimclick"]) {
1016
1062
  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";
1017
- } else if([url hasPrefix:@"nhallonepayansimclick"]) {
1063
+ } else if([sUrl hasPrefix: @"nhallonepayansimclick"] || [sUrl hasPrefix: @"nhappcardansimclick"] || [sUrl hasPrefix: @"nhallonepayansimclick"] || [sUrl hasPrefix: @"nonghyupcardansimclick"]) {
1018
1064
  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";
1019
- } else if([url hasPrefix:@"citispay"]) {
1020
- itunesUrl = @"https://apps.apple.com/kr/app/%EC%94%A8%ED%8B%B0%EB%AA%A8%EB%B0%94%EC%9D%BC/id1179759666";
1021
- } else if([url hasPrefix:@"payco"]) {
1022
- itunesUrl = @"https://apps.apple.com/kr/app/payco-%ED%8E%98%EC%9D%B4%EC%BD%94-%ED%98%9C%ED%83%9D%EA%B9%8C%EC%A7%80-%EB%98%91%EB%98%91%ED%95%9C-%EA%B0%84%ED%8E%B8%EA%B2%B0%EC%A0%9C/id924292102";
1023
- } else if([url hasPrefix:@"naversearchapp"]) {
1065
+ } else if([sUrl hasPrefix: @"payco"]) {
1066
+ itunesUrl = @"https://apps.apple.com/kr/app/payco/id924292102";
1067
+ } else if([sUrl hasPrefix: @"lpayapp"] || [sUrl hasPrefix: @"lmslpay"]) {
1068
+ itunesUrl = @"https://apps.apple.com/kr/app/l-point-with-l-pay/id473250588";
1069
+ } else if([sUrl hasPrefix: @"naversearchapp"]) {
1024
1070
  itunesUrl = @"https://apps.apple.com/kr/app/%EB%84%A4%EC%9D%B4%EB%B2%84-naver/id393499958";
1071
+ } else if([sUrl hasPrefix: @"tauthlink"]) {
1072
+ itunesUrl = @"https://apps.apple.com/kr/app/pass-by-skt/id1141258007";
1073
+ } else if([sUrl hasPrefix: @"uplusauth"] || [sUrl hasPrefix: @"upluscorporation"] ) {
1074
+ itunesUrl = @"https://apps.apple.com/kr/app/pass-by-u/id1147394645";
1075
+ } else if([sUrl hasPrefix: @"ktauthexternalcall"]) {
1076
+ itunesUrl = @"https://apps.apple.com/kr/app/pass-by-kt/id1134371550";
1077
+ } else if([sUrl hasPrefix: @"supertoss"]) {
1078
+ itunesUrl = @"https://apps.apple.com/kr/app/%ED%86%A0%EC%8A%A4/id839333328";
1079
+ } else if([sUrl hasPrefix: @"kakaotalk"]) {
1080
+ itunesUrl = @"https://apps.apple.com/kr/app/kakaotalk/id362057947";
1081
+ } else if([sUrl hasPrefix: @"chaipayment"]) {
1082
+ itunesUrl = @"https://apps.apple.com/kr/app/%EC%B0%A8%EC%9D%B4/id1459979272";
1025
1083
  }
1026
- if([itunesUrl length] > 0) {
1027
- [self openAppURLString: itunesUrl];
1084
+
1085
+ if(itunesUrl.length > 0) {
1086
+ NSURL *appstore = [NSURL URLWithString: itunesUrl];
1087
+ [self startAppToApp: appstore];
1028
1088
  }
1029
1089
  }
1030
1090
 
1031
-
1032
- - (void) startAppToApp:(NSURL*)url {
1033
- UIApplication *application = [UIApplication sharedApplication];
1034
- if (@available(iOS 10.0, *)) {
1035
- [application openURL:url options:@{} completionHandler:nil];
1036
- } else {
1037
- [application openURL:url];
1038
- }
1039
- }
1040
-
1041
- - (void) openAppURL:(WKNavigationAction *)navigationAction {
1042
- if (@available(iOS 10.0, *)) {
1043
- [[UIApplication sharedApplication] openURL:navigationAction.request.URL options:@{} completionHandler:^(BOOL success) {}];
1044
- } else {
1045
- [[UIApplication sharedApplication] openURL:navigationAction.request.URL];
1046
- }
1047
- }
1048
-
1049
- - (void) openAppURLString:(NSString *)url {
1050
- if (@available(iOS 10.0, *)) {
1051
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url] options:@{} completionHandler:^(BOOL success) {}];
1052
- } else {
1053
- [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
1054
- }
1091
+ - (BOOL) isItunesURL:(NSString*) urlString {
1092
+ NSRange match = [urlString rangeOfString: @"itunes.apple.com"];
1093
+ return match.location != NSNotFound;
1055
1094
  }
1056
1095
 
1057
1096
 
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "Thibault Malbranche <malbranche.thibault@gmail.com>"
9
9
  ],
10
10
  "license": "MIT",
11
- "version": "11.18.12",
11
+ "version": "11.18.13",
12
12
  "homepage": "https://github.com/react-native-webview/react-native-webview#readme",
13
13
  "scripts": {
14
14
  "start": "node node_modules/react-native/local-cli/cli.js start",