The mailto: and tel: links to launch mail and phone applications in my ionic v2 cordova app don't work on iOS 13. They work on Android and in earlier versions of iOS an no problem.
I am using cordova 9.0.0 & cordova-ios 5.0.1
Also, in case they're relevant cordova-plugin-whitelist 1.3.3 & cordova-plugin-inappbrowser 3.1.1-dev (to resolve a different iOS13 issue with links not opening using inappbrowser, documented here https://github.com/OutSystems/cordova-plugin-inappbrowser/pull/9).
I think I have tried all combinations of suggestions in this post (which is long before iOS13 came out), none of them work - Tel:* and Sms:* links don't work on ios under cordova in phonegap?
My HTML looks like this:
<a class="item item-icon-left item-icon-right dark" href="tel:0044123456789" ng-click="trackTap('Telephone')">
<i class="icon ion-ios-telephone"></i>
Give us a call
<i class="icon ion-ios-arrow-right"></i>
</a>
<a class="item item-icon-left item-icon-right dark" href="mailto:[email protected]" ng-click="trackTap('[email protected]')">
<i class="icon positive ion-email"></i>
Email us
<i class="icon ion-ios-arrow-right"></i>
</a>
In config.xml I currently have:
<allow-navigation href="*" />
<allow-intent href="http://*/*"/>
<allow-intent href="https://*/*"/>
<allow-intent href="tel:*"/>
<allow-intent href="sms:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="geo:*"/>
I've removed:
<access launch-external="yes" origin="tel:*" />
<access launch-external="yes" origin="mailto:*" />
as I believe they are no longer required.
In another page of the app I have:
$http({
method: 'GET',
url: 'http://www.domain.co.uk/app/app-json.php',
timeout: 15000
})
Some posts suggest removing <allow-navigation href="*" /> but if I do that then the $http GET call no longer works on any platform/ OS version (and the issue is not resolved anyway).
When clicking the tel: and mailto: links in the XCode console I see
CDVWebViewDelegate: Detected redirect when loadCount=-1
but that appears when it works in earlier iOS versions as well, so I don't think it's relevant.
After removing <allow-navigation href="*" /> from the config.xml (and breaking the AJAX call on all devices) I see the following error on iOS 13 when clicking the links:
2019-10-06 22:11:28.960247+0100 GPCalc[89217:4657117] [default] Failed to open URL tel:0044123456789: Error Domain=NSOSStatusErrorDomain Code=-10814 "(null)" UserInfo={_LSLine=247, _LSFunction=-[_LSDOpenClient openURL:options:completionHandler:]}