openUrl does not work on ios when protocol is tel://XXXNUMBER


#1

openUrl does not work on ios when protocol is tel://XXXNUMBER
Has anyone tried this before?
I have imported import { openUrl } from ‘utils//utils’;
Seems like a permission issue in ios


#2

It should work, may I know which device / OS version you are testing this against.


#3

You’d best Google for something like tel LSApplicationQueriesSchemes


#4

@Eddy I’m not sure, I have few apps that works with tel and mailto URL schemes yet I don’t add those to LSApplicationQueriesSchemes. Do you think it is best practice to add them?


#5

Use the nativescript-phone, solid


#6

nativescript-phone does exactly what utils.openUrl is doing here. The only missing piece may be just what @Eddy already mentioned.


#7

Yeah i don’t know, we use it in our app never had an issue


#8

iPhone 6, ios 11.2.2


#9

I ran into a similar issue when trying to dial phone numbers in the iOS version of my app. As it turns out, there are some restrictions on what information you can include in a “tel:” string.

Since my app is written using Angular, I created a pipe which ensures that only numbers were included and that the phone number started with “1” (I don’t have any international numbers that my app needs to dial–US only).

Let me know if this helps!

Steve


#10

that was a good suggestion and I realised that my numbers are having space and I need to trim that.
numberToCall.replace(/\s/g, “”)