1
votes

My app uses href: tel links and it worked correctly, when I first released it a year ago.

I used allow-intent in my config.xml:

  <access origin="*"/>
  <access origin="tel:*" launch-external="yes"/>
  <access origin="sms:*" launch-external="yes"/>
  <plugin name="cordova-plugin-whitelist"/>
  <allow-intent href="http://*/*"/>
  <allow-intent href="https://*/*"/>
  <allow-intent href="tel:*"/>
  <allow-intent href="sms:*"/>
  <allow-intent href="mailto:*"/>
  <allow-intent href="geo:*"/>

But now freshly compiled app for iOS with the same config doesnt work with href: tel links. Just nothing happens.

As said here: cordova - Why tel:* links don't work on ios? - Stack Overflow I need to remove allow-navigation from config.xml. But I dont have it there.

What is the proper configuration to make it work under new cordova?

EDIT: other external links and sms:* dont work as well, but on iPad tel:* link offers to copy number (expected behaivior)

2
Do you know which CLI is being used to build the app? which cordova-ios platform version is being used? - jcesarmobile
As far as I know phonegap.build.com is on 4.3.0 of Cordova - Denis Matafonov
Why don't you check? That information is on the build page - jcesarmobile
Didnt know this :( PhoneGap (iOS / Android / Windows) => cli-6.3.0 (4.2.0 / 5.2.1 / 4.4.1) - Denis Matafonov

2 Answers

1
votes

Try removing the access origin for tel and sms

<access origin="tel:*" launch-external="yes"/> <access origin="sms:*" launch-external="yes"/>

Also you can try setting the CLI version to 6.4.0, there has been some changes in how the intent and navigation filter worked in cordova-ios 4.3.0 and you are using 4.2.0

<preference name="phonegap-version" value="cli-6.4.0" />

But I've seen a bug report about tel links working when the app was locally compiled with Cordova but not working on Phonegap Build, so it might be a bug there.

0
votes

Comment both the below allow-navigation and access origin launch-external sets of links from config.xml (Manifest) for the tel:, sms: and mailto:* links to work on ionic cordova or phonegap with android and ios:

<allow-navigation href="tel:*" />
<allow-navigation href="mailto:*" />

<access origin="tel:*" launch-external="yes" />
<access origin="mailto:*" launch-external="yes" />

Maybe, this is so because the latest Cordova and Phonegap versions are designed to use the below set of allow-intent links instead of allow-navigation and access origin launch-external links:

<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />