LinkingIOS says the following:
* The iOS simulator does not support the mailto:
and tel:
schemas
* because the Mail and Phone apps are not installed - you will need to test
* them on a device.
What can I use in my React Native app to link to the native Mail app when an email address is clicked on? And similarly, how do I give the option to call or text-message when a telephone number is clicked on?
You can use the LinkingIOS.openURL(url). It will work perfect on actual iPhone. You cannot test it on Simulator because those apps are not available on simulator. So, use mailto: for email, tel: for call & sms: for sending SMS.
I would also recommend you doing feature detection using LinkingIOS.canOpenURL because, iPad will also not support the call and sms features. So its always good idea to check the support for the url scheme before using it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With