In our Xamarin Forms project we have a webview, and that webview loads a page from the web. That page contains HTML, including a link to a telephone number with the following HTML:
<a href="tel:18005555555">1-800-555-5555</a>
In Android, the user clicks the link in the webview and it opens the dialer no problem, but in iOS, it does nothing.
Here is the C# code inside the Xamarin page that handles the link click:
`
void bodyContent_Navigating(object sender, WebNavigatingEventArgs e)
{
var url = e.Source.GetValue(UrlWebViewSource.UrlProperty).ToString();
bool isAboutUsPage = url.Equals(aboutUsPageUrl);
if ((Device.OS != TargetPlatform.iOS || !isAboutUsPage))
{
e.Cancel = true;
}
if (!isAboutUsPage)
Device.OpenUri(new Uri(url));
}
`
Any idea why this isn't opening the dialer in iOS?