Calling alternate browsers on the iPhone

Many users of iCab Mobile ask me, if they can change the default browser on the iPhone to iCab Mobile, so that iCab is called instead of Safari if another app lets the system open a web page. Unfortunately I have to answer “No”. The iPhone OS will always call Safari. Even if Safari is switched off in the parental control settings, the user would only get an error message that the web page cannot be opened, regardless if there’s a browser like iCab Mobile installed, which would be able to open the page.

So I asked myself, if there’s a solution for this. Would it be possible for an app to open a web page in iCab Mobile if it is installed and ┬áto open the page in Safari if iCab is not available. The answer is “Yes, but it requires some modifications in these apps”.

Of course the problem is not about iCab Mobile alone, there are many other alternative web browsers for the iPhone, also other applications like RSS readers, Mail apps where the same problem occurs: the iPhone OS won’t call them, it will insist in calling the default apps (e.g. Safari for web pages and RSS feeds, Mail for “mailto” URLs).

This is why I’ve created a proposal which can solve this issue. An app would be able to open a web page in a web browser, but it doesn’t have to know if this is Safari, iCab Mobile or any other alternative web browser. The same for RSS feeds, it can just pass the “feed” URL to the iPhone OS and it will be delivered to an RSS reader the user has installed, or if there’s none installed, the RSS feed would be opened in Safari. Of course a similar thing can be done for alternative Mail apps.

In order to get this working, the iPhone apps which provide an option to open URLs in external apps (currently these are probably only Safari and Mail) and the apps which can receive URLs from other apps do need to be modified.

My proposal includes a simple Objective-C class, which is doing all the magic stuff, so all apps would only need to add one or two lines of code, in order to get this working.

The fact that my proposal requires a modification of existing apps makes clear that it can be difficult to get accepted. Apps need to follow some new conventions. This is why I’m asking for some feedback and critics. Is my proposal a stupid idea, or is it worth to be implemented in iPhone apps? If there are developers who think that the proposal is worth to be discussed, please let me know. I’ll create a discussion board/Mailing list at google or yahoo in this case. Also spread the word to other developers, if you think iPhone apps can benefit from being able to open alternative internet apps instead of the default apps.

You can download an archive with my proposal, and a sample implementation.

There’s also a web page with an overview about my proposal.