Azurati

iOS Simulator in more detail including simulate Pinch gesture



iOS Simulator icon

iOS Simulator icon

This simulator can be used to simulate both the iPhone and the iPad.

It is available as part of the iOS SDK. Developers can download the SDK via the iOS Dev Center. Otherwise, anyone with an account should be able to download Xcode within the Mac App Store. You will need to be a paid developer if you wish to get access to unreleased versions of the iOS.

For reference, this is currently a download of around 1.4GB in size.

NOTE: This officially only runs only on Mac OS X so you need an Apple computer to use.

The iOS Simulator can be found within the Xcode application. There are a couple of options to access this.

 

Option One

From within Xcode, select Preferences. Under Downloads, you have the options to install the simulator:

Install from within Xcode

Install from within Xcode

Back to top  

Option Two

If you have downloaded Xcode inclusive of the SDK from the iOS Dev Center, this option requires you to right click on the Xcode icon and select “Show Package Contents”:

Show Package Contents

Show Package Contents

Within the Xcode package, you can now drill down to find the iOS Simulator:

iOS Simulator within Xcode

iOS Simulator within Xcode

Once you drill down to the location:

/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app

you can drag the icon to your dock for quick access or make an alias somewhere else so you can launch it more easily next time.

Back to top  

Hints and Tips

When you launch the simulator, you have access to a few devices:

Select device to simulate

Select device to simulate

Under Version, you can select from any versions of the iOS that you have installed.

The above screen also shows other keyboard shortcuts and menu options that can be used within the simulator to:

  • Manipulate orientation
  • Simulate shake gesture
  • Simulate pressing the the Home button to return to the Home screen
  • Simulate pressing the the Lock button to lock the device
  • Toggle the In-Call Status Bar to see how an application looks when a phone call is in progress
  • Toggle the software keyboard

If you want to simulate the Pinch gesture, you need to press and hold the Option key to bring up two circles on the screen. Use the mouse to move these circles:

Use Pinch within iOS Simulator

Use Pinch within iOS Simulator

Press the Shift key to move the centre position of this gesture to a new location that you want to pinch at.

Other gestures include:

  • Tap = Click
  • Touch and hold = Hold down mouse button
  • Double tap = Double click
  • Swipe = Place pointer at starting position, click and hold mouse button, move the pointer in the swipe direction and release mouse button
  • Flick = Place pointer at starting position, click and hold mouse button, move the pointer quickly in the flick direction and release mouse button
  • Drag = Place pointer at starting position, click and hold mouse button, move the pointer in the drag direction

If you wish to debug within Mobile Safari, you can enable this option within Settings> Safari> Advanced:

Safari Debug Console

Safari Debug Console

And then within Mobile Safari you will see:

Debug console in Mobile Safari

Debug console in Mobile Safari

Back to top