Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1986 from xamarin/phonedialer-surface-exception
Browse files Browse the repository at this point in the history
Surface exception for not supported phone number on iOS PhoneDialer
  • Loading branch information
jfversluis committed Apr 5, 2022
2 parents f96ef75 + 731988e commit 101971f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Xamarin.Essentials/PhoneDialer/PhoneDialer.ios.cs
Expand Up @@ -11,12 +11,12 @@ public static partial class PhoneDialer

internal static bool IsSupported => UIApplication.SharedApplication.CanOpenUrl(CreateNsUrl(new string('0', 10)));

static async void PlatformOpen(string number)
static void PlatformOpen(string number)
{
ValidateOpen(number);

var nsUrl = CreateNsUrl(number);
await Launcher.PlatformOpenAsync(nsUrl);
Launcher.PlatformOpenAsync(nsUrl);
}

static NSUrl CreateNsUrl(string number) => new NSUrl(new Uri($"tel:{number}").AbsoluteUri);
Expand Down

0 comments on commit 101971f

Please sign in to comment.