** Updated 11/25/2009 - More updates to work with latest Safari 4.04 (531.21.10) **
** Updated 8/25/2009 - More updates to improve Safari 4.x compatibility **
Watch screen cast
Lately we have been doing a lot of work with rendering Web content optimized for mobile devices. One of the most popular mobile devices is
Apple's iPhone. Many times I will be giving a presentation on a Windows machine and have no way to demonstrate how our content would look on mobile Safari, the iPhone Web browser. I have often times
longed to be able to test against my localhost Web server as well.

Enter Webkit (Safari for Windows)
So one day it dawned on me that Webkit (Safari's rendering engine) is VERY similar on Safari for Windows and the iPhone. Could I somehow embed just the rendering component into a native Windows application and give it enough polish to do a decent job of simulating the iPhone Web browsing experience? After a weekend of hacking the answer is YES. iBBDemo correctly renders Webkit targeted html including the custom -webkit CSS extenstions, effectively giving us a compelling demo/test platform for iPhone Web content from the comfort of a Windows desktop (Note, I have only tested on Vista).
Figure 1: Render iPhone Web Browser Content on Windows with the correct user agent!
Free for the Community!
Since I think this could be broadly useful and fairly unique I am releasing it here on labs as an unsupported utility. I also put together a short 7 minute screen cast overview of iBBDemo.
Watch screen cast
Okay how do I get started?
If you are running Safari 3.x:
If you are running Safari 4.x
** NOTE: For the 4.x version, make sure you make a folder for iBBDemo and copy it in there. The reason is, with 4.x iBBDemo will grab the DLL dependencies from Safari, and copy them local. It will then use registration-free COM to invoke WebKit.DLL as a COM object. This is required because Safari 4.x does not fully expose WebKit to COM, and I don't want to muck with the user's registry. BTW, simply registering WebKit is not enough.
3) Extract and execute iBBDemo.exe (Safari 3.x) or iBBDemo4.exe (Safari 4.x)
Have fun!
Shaun Sullivan
CTO, Blackbaud, Inc.
shaun dot sullivan at blackbaud dot com