Well it was pretty much inevitable. I kept delaying the purchase of my iPhone in hopes of some sort of GPS announcement. The reality is that we’ll probably have to wait until the next version for GPS support. I gave up the incredible Blackberry 8800, with built-in GPS, for the iPhone this weekend. The main reason I switched is that we’re planning some interesting developments for the iPhone at Ublip. The mobile OS road to get to the iPhone has been an interesting one and basically looks like: Symbian > Windows Mobile > RIM > OS X.
The main reason for this post is to discuss the HTTP_USER_AGENT string for the iPhone. For my device it looks like:
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C28 Safari/419.3
I’ve seen several companies implement a completely different URL for the iPhone version of their application. Yet some companies such as 37signals detect the iPhone and display optimized content. A perfect example is their tadalist product. If you have an iPhone check it out and you’ll see what I mean. Although the iPhone does an INCREDIBLE job of rendering content as you would see it in desktop Safari, the user experience is much better when optimizing for the device (big buttons, fonts, screen transitions, etc).
If you’d like to see the user agent for your iPhone then simply browse to the following page on the Ublip site:
http://iphone.ublip.com/user_agent.php
If you’re doing some sort of detection and determining what content to display (ie indexOf(”iPhone”)) beware that the iPod touch may have a different user agent string, yet still runs mobile Safari. I plan on doing some follow up posts on server-side device detection using Ruby on Rails.