I know this is an old question, but I've encountered it too and just written a small plugin to help with it. Siddhartha's answer is almost right, but when I used it, it intercepted all web requests, including those to my index.html
, and this seemed to move my app into Safari. What I needed was a way to handle only explicit requests, so I could open specific (external) URLs in Safari.
There are many similar questions about Phonegap, which appears to embed special handling for window.open
with _system
. That would be nice, but Cordova doesn't have this functionality.
In the end, I wrote a small plugin that embeds enough Objective C (closely modelled on Siddhartha's answer) but due to the magic of plugins, it can be executed on demand, using cordova.exec
. I'd love this to patch into window.open to achieve the same functionality as Phonegap, but that'll be for another day, and it doesn't really affect this answer.
As far as I can tell, in modernish Cordova, this is the only viable strategy.