Apple's iPhone Simulator almost as good as the real thing

iPhone simulator viewing this blog entryI'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 . Note that you will need a Macintosh to run the program -- It doesn't do Windows.

Master your iPhone in one minute a day:

Sign up to iPhone Life's Tip of the Day Newsletter and we'll send you a tip each day to save time and get the most out of your iPhone or iPad.

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!

Master your iPhone in one minute a day: Sign up here to get our FREE Tip of the Day delivered right to your inbox.

<p>Ben Stallings is a Web Developer for <em>Smartphone Magazine</em> and <em>iPhone Life</em>. He also does freelance Web development, specializing in the Drupal content-management system, under the name Interdependent Web. He lives in Emporia, Kansas.</p>