fix(ios): make system open tel, sms, mailto and geo links (#881)

This commit is contained in:
jcesarmobile 2021-06-11 14:25:43 +02:00 committed by GitHub
parent 3b6757fc44
commit 2fef3046fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -539,8 +539,9 @@ static CDVWKInAppBrowser* instance = nil;
[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;