Hey @caminoninja, this is actually expected behavior as the iOS Simulator does not have the Mail or Phone app available. Messages is available which is why the sms: scheme works. The RN docs have a note about this (well only tel:): Linking · React Native
This is a good example of why it’s a good practice to use canOpenUrl to check if the system can open a url before calling openUrl.
Hey @adamjnav, when I read those docs I got the impression it was not a good idea to call canOpenUrl
If your app is linked against an earlier version of iOS but is running in iOS 9.0 or later, you can call this method up to 50 times. After reaching that limit, subsequent calls always return false. If the user reinstalls or upgrades the app, iOS resets the limit.
What is the benefit of calling canOpenUrl over calling openUrl and handling the promise rejection if it fails?
I suppose the question I have now is: what version of iOS is React Native/Expo SDK 39 linked against.
Looks like they will drop support for iOS 10 in next version of the SDK (41).
So, the question is really if the only “benefit” is failure to open even if the App you are linking to is installed if you tried opening more than 50 times before you installed the App.
canOpenUrl is “reccommended” and not required according to the documentation. But it really seems like a bad idea.