Prathik Kotian
Prathik Kotian

Reputation: 63

How to make click to call in Ionic For IOS?

I have tried this method and it is working perfevtly in Android but not in IOS

<a href="tel: 1111111">Call</a>

And in my config.xml file

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

the above method is tested in real devices and it is working only for android, is there any other method to make it work in IOS

Upvotes: 1

Views: 1280

Answers (4)

niteen bhende
niteen bhende

Reputation: 29

To work on IOS you need to add in the config.xml

in .js window.open('tel:' + number, '_system');

Upvotes: 0

read
read

Reputation: 350

For your code to work on IOS you need to add in the config.xml

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

Doing this breaks the functionality on android so make sure to add it inside

<platform name="ios">

Upvotes: 1

Prathik Kotian
Prathik Kotian

Reputation: 63

This method worked for me in IOS

<div onclick="window.open('tel:7795713372', '_system', 'location=yes')">Call me</div>

Also you need to install cordova inapp browser plugin. And need to whitelist the request in config.xml by adding whitelist plugin.

Upvotes: 2

iYoung
iYoung

Reputation: 3622

Use below code to make it work

<a href="tel:number" class="button button-positive">Call me</a>

Upvotes: 1

Related Questions