I'm running my Xamarin Cross platform in Iphone and the Device.OpenUri isn't working, this func works as expected in Android platform but in iOS when i click in a whatsapp URI it only reload the page and don't open the Whatsapp APP
i've tried to add "whatsapp" references in LSApplicationQueriesSchemes inside info.plist but unsucessfuly
Hipnosoftpage.IsVisible = false;
ErroRede = true;
DisplayAlert("Sem Conexão", "Verifique sua conexão com a internet.", "Tentar Novamente").ContinueWith(t =>
{
Hipnosoftpage.Reload();
}, TaskScheduler.FromCurrentSynchronizationContext());
}
var url = e.Url;
if (url.StartsWith("whatsapp://", StringComparison.InvariantCultureIgnoreCase))
{
try
{
Device.OpenUri(new Uri(url));
Hipnosoftpage.GoBack();
}
// Can not catch Android exception type in NetStd/PCL library, so hack it...
catch (Exception ex) when (ex.Message.StartsWith("No Activity found to handle Intent", StringComparison.InvariantCulture))
{
// WhatsApp not installed : Android.Content.ActivityNotFoundException: No Activity found to handle Intent
Console.WriteLine(ex);
}
}
}
I expect the whatsapp openning, but the Device.OpenUri don't open properly and don't give me any error in debug console.