Raphael Caixeta

I make stuff. Sometimes I write about it.
  • Home
  • Tweet Me
  • Google+
  • Email Me
  • Feed
  • Making Chrome better on iOS

    Although Google Chrome is *essentially* nothing more than a UIWebView skin on iOS, it’s still a much better browsing experience overall. The one thing that really kills Chrome is the fact that all apps will launch in Safari by default. But there’s a way to prevent this. It takes co-operation from all of the major developers, but if implemented, could be really, really cool.

    Here’s a quick run down on how it works:

    When the user clicks the “Open In Web Browser” option, here’s the code that needs to be implemented in order to default to Chrome, but fallback to Safari if Chrome is not installed.

         if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"googlechrome:"]]) {
             [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"googlechrome://%@", myURL]]];
         } else {
             [[UIApplication sharedApplication] openURL:[NSURL URLWithString:myURL]];
         }
    

    Why is this a good idea? If a user has Chrome installed, chances are they wish that it would be their default browser. And this method works. Very well, actually.

    Again, just an afternoon’s thought. But it would be awesome to see it come together.

    Agree? Disagree? I’d love to know why. Email or tweet me.

    Update: A lot of people have emailed/tweeted me saying that it’s unfair for me to say that Chrome is “just a UIWebView skin”. I definitely didn’t mean to downplay the hard work that went into making Chrome for iOS. The speed difference doesn’t bother me, and it’s my default browser on all my iOS devices. I simply meant that due to Apple’s restrictions, Chrome uses the UIWebView without all of the awesome things that make Chrome, Chrome.

    • Jul 9th, 2012
    • Share
    • Tweet
©2013 Raphael Caixeta