Telephone number link not working when project embedded in Xcode

Hi everyone,

I’m hoping somebody might be able to point me in the right direction with regard to a small issue I have encountered with a Hype/Xcode 8 project I am working on. I have a button with a telephone hyperlink on it which does not seem to work when exported (.ipa) and previewed on my iPhone. I have attempted two methods:

  1. directly linking the tel:12345 number on the button

  2. placing a div tag with the link inside the html element of the image (as per another post I read on this forum).

Oddly enough, when I press hard on an iPhone 6 (e.g. force-touch) it does work - but on any other non-force-touch device the link simply doesn’t work.

Any ideas/tips would be HUGELY appreciated.

On a side note, I have found building my app using Hype to be an excellent experience and would highly recommend this approach for any simple multimedia based mobile projects. I plan to develop more apps using this method.



Try using the on touch up or down instead of on click action

Hey Mark,

Thanks for the suggestion … but it didn’t work :frowning:

I also tried creating a timeline with a ‘go to url’ action on frame5 (paused at frame 1) and then placed an action on the button in the main timeline to trigger the sub-timeline to play that timeline (and ultimately trigger the action) … still no joy. [trying to think outside of the box - literally]

I have observed that the force-touch action only works with the div tag method of placing the tel link on the image/button. It seems that directly invoking a ‘go to url’ action on an element within hype does nothing.

I have uploaded a zip file containing both my Xcode project and my Hype file in the hope that you might be able to take a peek. I used your advice (and sample Xcode/Hype sample) previously to overcome the ‘open Safari’ issue - as the Trumpster would say: “So grateful … nobody is more grateful than me … nobody!”

Happy for you to charge me for your time/advice (if you’re inclined - really, more than happy). Seriously. I’m stumped (Trumped)!



Hi Chris,

I will not be able to look at this for a few days as I have no access to my computer but will as soon as possible.

My guess is you’ll need a WKNavigationDelegate that implements one of the decidePolicyFor methods.

There’s an objective-c/incomplete solution here:

Thanks Jonathan,

I struggled to work that out (I’m not much of a programmer - more of a hack) … I ended up devising a dodgy work-around - opening a webpage in Safari with an ‘onload’ script to tel:123456 … seems to work.



Update: Using the ‘callback’ method Mark Hunte shared with me recently works if you replace a typical " http://url " in the callBack script with a " tel://123456789 " … works perfectly. Thanks again Mark.

1 Like