Skip to content

Commit

Permalink
fix(ios): make system open tel, sms, mailto and geo links (apache#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Jun 11, 2021
1 parent 3b6757f commit 2fef304
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ios/CDVWKInAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,9 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig
[self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
}

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

0 comments on commit 2fef304

Please sign in to comment.