Apple's iPhone Simulator almost as good as the real thing
I'm writing this post on an iPhone... not a real phone, but a simulated one that appears on my MacBook screen. it's about 50% larger than actual size, and it's very shiny and realistic looking. But most importantly, it looks and acts just like a real iPhone when it runs Safari.
There are a number of bad iPhone simulators out there on the Web... they use Javascript and/or Flash to approximate the look of an iPhone, but they use your computer's own fonts to do it. For the purposes of Web site development, that is not helpful, because the iPhone renders fonts and CSS slightly differently. What you need is a real simulator.
Fortunately, Apple offers its SDK (Software Development Kit) for free to anyone who can claim to be an iPhone developer -- and if your goal is to make a Web site or two more iPhone-friendly, as far as I can figure it, that makes you an iPhone developer. The address is http://developer.apple.com/iphone/program/download.html . Note that you will need a Macintosh to run the program -- It doesn't do Windows.
Now, the SDK is intended for software developers, so it includes all kinds of programming tools that may not interest you if you just want to test your Web site for iPhone friendliness, but you don't have to install them all, and the simulator runs as a separate program you can add to your dock. (It's hidden, in /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications).
Once you start up the Simulator, you'll find it's quite easy to use Safari; there are just a few tips that should be more obvious: to zoom in and out, hold the option key and drag with the mouse -- the mouse pointer will become one of two dots representing your fingers as you pinch the screen. And if you're typing on your computer's keyboard rather than the one on the screen, to override the spellchecker's persistent and unhelpful suggestions (such as uncapitalizing the first words of sentences when you've typed them capital), just backspace and retype. (This may be a function of the Auto-Capitalization feature.)
Obviously there are a lot of things you can't do with the Simulator. It has no accelerometer, so any program that requires more sensitivity than just vertical or horizontal orientation is not going to work. And there's no way to take a screen capture (which on a real iPhone requires holding the home button while pressing the power button) -- the image at right was taken with the Mac OS utility Grab. But on the whole this is a very useful tool, and a great example of how giving something away for free is sometimes better for the bottom line than charging for it -- I'm sure that there wouldn't be so many new, free apps available for the iPhone, nor so many iPhone-friendly Web sites without tools like this from Apple!
In the coming weeks I'll be working to make our own iPhone Life Web site more iPhone-friendly, and I'll keep you posted about what I learn along the way!



Great Info
Thanks for the great information. Have you tested or is there a way to sync your info and apps onto the simulator? Can you run the App Store to test a program before actually trying it?
-Steve Green
not sure
Thanks for your question, Steve! Unfortunately my answer is, I'm not sure. Because the simulator is designed for testing apps, I'm sure there must be a way to get them on there, but because I am only using it to test Web sites, I didn't install all the development tools (or read all the documentation). When I run it, it has no App Store app, and if I visit the App Store Web site, Safari crashes. So you may have to download the apps to your Mac and then move them into the appropriate directory -- the simulator has its own Unix-style file system which is easily accessible through the Finder.
As for syncing data.... the simulator doesn't show up as a connected device either in the Finder or in iTunes, and a quick Web search doesn't turn up any information about how to do it. So again it may be a question of copying files over manually from your desktop applications, if they are compatible formats. The simulator doesn't come with the Calendar, Music, Videos, and Mail apps, only Contacts and Photos.
Good luck!
Web Developer
iPhone Life magazine
rompa di
lol, thats suck, why dosent it work on Windows??? most of all people use Windows...
OS X
well, Anonymous, the cynical answer is that Apple wants people to buy Macs. But there's also a technical answer, which is that the iPhone's operating system is a variant of Mac OS X, so it's a lot simpler to emulate it in Mac OS X than in Windows. Microsoft probably has the same excuse for never providing a way to sync Windows Mobile devices with any operating system besides Windows.
Web Developer
iPhone Life magazine