I have included the following code in my info.plist file:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>mailto</string>
<string>tel</string>
<string>https</string>
</array>
void _makePhoneCall(String phoneNumber) async {
if (await canLaunchUrl(Uri.parse('tel:$phoneNumber'))) {
await launchUrl(Uri.parse('tel:$phoneNumber'));
} else {
throw 'Unable to make a call to the number $phoneNumber';
}
}
This code works perfectly on Android. However, when running on an iOS device simulator in debug mode, launching URLs only works for the "https" scheme. Attempting to launch "tel" and "mailto" schemes results in errors. Can't test on real iPhone device.
I expect this to open the phone app and mail app. How can I resolve this issue?