Create iPhone Compatible Page & Detect Mobile Browser
If you want to make a basic iPhone combatible version of your site in a few minutes, download latest XCode development environment from http://developer.apple.com. Install the package and you will find dashcode, inside /developer/applications path.
Now open your dashcode and choose new project then select RSS Template,
After this step dashcode will create all necessary files for you, all you have to do changing Application Attributes and some style if you like.
Here I have changed Feed URL to my blog feed.
After that you will want to deploy your application to your site, that’s very easy too. Just go to “test & share” section and save to disk, then upload your deployed version with your favorite ftp application.
Here be careful about javascript feed you provided for rss, it has to be in the same folder with your iphone compatible version. ( Remember that there are security restrictions on where JavaScript can load resources from. You can use a proxy for your feed as one of the simple solutions. )
After these step you got your web site’s iphone compatible version up and running. Now It’s time to detect device of your user connected to your site. It is even simpler with Andy Moore’s mobile device browser dedection file. Andy also provides you a cool function generator which creates detection function for configuring your site’s behavior when it detects different mobile browser. Check Dedect Mobile Browser page of Andy Moore
Now when you browse my page via iPhone or iPod, you will be redirected to http://iphone.guvenergokce.com
Wow, that was fast, I have developed this iphone page with detection faster than writing that blog post :)
By the way, If you want to create an iphone version of your wordpress blog, you should find many cool css styling information that generates iphone compatible version of your blog quickly. This post’s purpose is just to give an idea of how to use dashcode and iphone dedection.
If you have better ways please recommend on comments, future is open.
If you enjoyed this post, make sure you subscribe to my RSS feed!

Flickr







Recent Posts
Subscribe to my blog
SMITH
Super-Duper site! I am loving it!! Will come back again, Thanks.
July 4th, 2009 at 1:04 pmDanny
Nice article - i would be interested in your comments on handsetdetection.com
November 25th, 2009 at 8:24 pmBoyd Elfert
Evaluate & Preserve your iPad for Absolutely free! -> http://bit.ly/cFBuis
April 6th, 2010 at 7:28 amnetbook giveaway
Wow man, I didn’t new this, cheers.
May 20th, 2010 at 6:59 pm