Solutions Log

February 15th 2011

Open external links in Safari.app

By default, PhoneGap-iOS opens external links within the PhoneGap WebView. This is a terrible default action because there are no navigation buttons within PhoneGap. A simple solution is to open the external links in… the external browser!

Given an external link such as:


When I am using PhoneGap-iOS.

When I want to open the link in the main browser (Safari.app).

Then add the following to the application delegate (myproject/Classes/myprojectAppDelegate.m):