CallNumber plugin

I’m using ionic 2’s callnumber plugin to make a call in my hybrid app, however, on the ios emulator the phone number isn’t clickable, but it works just fine on android. Any ideas?

my code is:

<span (click)="call()">Phone number</span>

call(){
 this.callNum.callNumber(phonenumber, true);
}

You need to push to your phone. iPhone’s emulator has no call capabilities nor device forwarding.

Can you please explain (newbie to ionic)?

build and deploy on your phone. don’t use the emulator. :slight_smile:

gotcha. yeah I deployed the latest version of the app to my iphone, but no luck.

You don’t need a plugin for this. use “tel:” protocol for the link. On a simulator this doesn’t work so like others have said you must deploy to a device to test this.

i use in my app and works perfectly both android and ios

do you know if using tel will open the phone’s dialer?

it will.

as a bit of background info, the operating system gives the native phone/dialer app access because that app has already registered with the OS as the default handler for the “tel” protocol.

Another link for you:

A piece of advice:

As a newbie, don’t chew off more than you can handle. That is – don’t get stuck putting all of your code into your one growing app.

This problem is not a difficult one to replicate, so you should be fine creating a new app in Ionic to simply show a “click me” button, and on the back end (*.ts), you’d have your “call(){…}” function.

This will tell you if any of your other code is responsible for why you can’t run it right now.

1 Like