I'm writing an iOS/Android app that has clickable telephone links.
My code for clicking on a link looks like this:
Label lblPhoneLine = new Label() { Text = "(000) 00-00000" };
lblPhoneLink.GestureRecognizers.Add(new TapGestureRecognizer
{
Command = new Command(async () =>
{
await Launcher.OpenAsync("tel:000-00-0000");
})
});
stackLayout.Add(lblPhone);
This code works fine for Android devices, but for iOS it doesn't do anything.
Also I've tried PhoneDialer.Open and that doesn't work either for iOS. Also removing the dashes in the phone number doesn't work either.
Any ideas or workarounds?
Also if this helps I am using the iPhone 15 iOS 17.2 Simulator. Thanks
According to the Application list from iOS simulator, it does not support the phone App.
It is recommand to achieve the function by deploying the project to iPhone device with Automatic provisioning or Manual provisioning.