Skip to content

Commit 2fef304

Browse files
authored
fix(ios): make system open tel, sms, mailto and geo links (apache#881)
1 parent 3b6757f commit 2fef304

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ios/CDVWKInAppBrowser.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,9 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig
539539
[self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
540540
}
541541

542-
//if is an app store link, let the system handle it, otherwise it fails to load it
543-
if ([[ url scheme] isEqualToString:@"itms-appss"] || [[ url scheme] isEqualToString:@"itms-apps"]) {
542+
//if is an app store, tel, sms, mailto or geo link, let the system handle it, otherwise it fails to load it
543+
NSArray * allowedSchemes = @[@"itms-appss", @"itms-apps", @"tel", @"sms", @"mailto", @"geo"];
544+
if ([allowedSchemes containsObject:[url scheme]]) {
544545
[theWebView stopLoading];
545546
[self openInSystem:url];
546547
shouldStart = NO;

0 commit comments

Comments
 (0)