cordovaphonegap-build

Tel:* and Sms:* links don't work on ios under cordova in phonegap?


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)


Solution

  • 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.