Simulating iPhone Safari Browser

There are several ways to simulate the iPhone Safari Browser:
  1. Using the Apple Safari Browser (PC or Mac)
  2. Using the Safari browser found in the iOS Simulator
Using the Apple Safari Browser (PC or Mac)
The Apple Safari browser (PC or Mac) download-able from http://www.apple.com/support/safari/. To simulate requests coming from an iPod, iPhone or iPad, you’ll need to activate the Developer tab by going to Preferences->Advanced and select “Show Develop menu in menu bar”. Once done, you just select which User Agent you need by selecting which device UA you want to simulate and make the requests to your site. The screen capture shows the develop tab with the UA options to choose from.
Using the Safari browser found in the iOS Simulator
The previous approach gives a pretty good approximation for how the iPhone Safari browser will behave but it’s not the best simulation. To get that, you’ll need to use the Xcode development environment that is only available on the Mac. To do this:
  1. Download XCode from http://developer.apple.com/xcode/ and install it
  2. Locate the Xcode icon using Finder
  3. Start up Xcode
  4. Create a simple project: File->New Project->View Based Application->Choose->Save As (eg. Webtest)
  5. The project should show up on Xcode
  6. On the “Simulator X.X | Debug” select Simulator and iPhone Simulator
  7. Click on “Build and Run” – the iOS simulator will pop up
Xcode new project screen

Xcode new project screen

Xcode after WebTest project has been created

Xcode after WebTest project has been created

iOS Simulator shows up

iOS Simulator shows up

Once this is set up, activate the Safari browser on the simulator and test.

About these ads

3 Comments

Filed under Mobile Web, QA, Testing

3 responses to “Simulating iPhone Safari Browser

  1. True, but interesting, as are many of your pages.
    I read through the archives over the past week or two,
    and I must say I think I’m found a new favorite.

  2. Barney

    “you’ll need to activate the Developer tab by … Once done, you just”

    Did you forget the important part here? :-)

  3. Thanks for catching it Barney. Made the fix.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s