2

I've got inappbrowser working in my Cordova 2.8 app except that links to iTunes, like this:

<p><a href="#" onclick="window.open('https://www.itunes.apple.com/us/app/apppname', '_blank', 'location=yes,enableViewPortScale=yes');">open</a></p>

do not open - can anyone help me out and explain how to fix this? (all other URL's open fine).

Stuart
  • 21
  • 1
  • 3

3 Answers3

3

Try to use encodeURI() method with your URL. I think it will resolve your problem

<a href="#" onclick="window.open(encodeURI('itms-apps://itunes.apple.com/us/app/google-maps/id58502735‌​4?mt=8&uo=4'), '_blank', 'location=yes,enableViewPortScale=yes');">Open</a>

Check out this post Phonegap App : External URL don't open in InApp Browser of IOS

Community
  • 1
  • 1
Shashi
  • 1,165
  • 5
  • 20
  • 39
0

You should use itms-apps://www.itunes.apple.com/us/app/apppname It'll open the link in the iTunes app.

NDakotaBE
  • 171
  • 11
0

The latest version of the plugin has solved this problem!

v 1.4

Mr.Thanks
  • 215
  • 3
  • 7