Note that there are some explanatory texts on larger screens.

plurals
  1. POCordova trying to dial telephone number
    text
    copied!<p>I am trying to dial a phone number in iOS, however I only have the simulator and an iPod Touch to test on.</p> <p>The code uses something along the lines of:</p> <pre><code>window.location.href = 'tel:01234567890'; </code></pre> <p>Working fine with Android, but in iOS it dies with: </p> <blockquote> <p>Failed to load webpage with error: The URL can't be shown</p> </blockquote> <p>Now, I do realise this has been asked before, but the general consensus from some time ago was "It doesn't work, you'll need to use a plugin". There haven't been many questions on this for some time though, and what questions there are seem to suggest it works when doing it programmatically (as above with <code>window.location.href</code>). I have tried the <a href="https://github.com/mchristie/PhoneGap-ios-PhoneDialer/">iOS PhoneDialer</a> and the newer version of the same plugin, but both have errors in XCode (<code>ARC forbids explicit message send of 'release'</code>) - a bit of faffing and I can get this running, but then PhoneGap doesn't find the plugin - it really feels like I'm hitting a brick wall with this method, and I can't believe something as simple as this requires something so over the top.</p> <p>I know you cannot auto-dial/auto-call a number for security reasons, but all I need to do is open the dialer with number pre-populated, which is surely no different to a <code>mailto:info@example.com</code> link opening your email client with the sender pre-populated? </p> <p>So, my questions are: </p> <ul> <li>Has this changed with a recent update to PhoneGap, iOS or XCode?</li> <li>Or, is it a case that I cannot do this on an iPod or Simulator, and it will work fine on an iPhone?</li> <li>How can I fix it? :)</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload