Skip to content

Using The iOS Simulator

The iOS Simulator is an OS X app from Apple that can be used to test your iOS apps on OS X. Here are some tips to help you out.

Before running your apps in Xojo, you’ll need to install the iOS Simulator. Since the iOS Simulator is part of the Xcode installation, you’ll have to download Xcode from the Mac App Store and install it. You’ll then have to run it once to accept its license agreement. After accepting the agreement, you can quit it since you won’t need it to be running in order to launch the iOS Simulator.

Starting the iOS Simulator is rather easy: simply press the big Run button on the toolbar of your iOS project. This builds your app and launches it in the iOS Simulator. Apps run this way are run in “debug mode” so you can set break points, look at variables and interact with the debugger just as you can with desktop or web apps.EEiOSSim.png

Within the iOS Simulator, you can use the mouse as a substitute for the touches you would do on an actual device. Click to simulate a tap. To scroll or swipe, click and move the mouse with the button held down.

Since your Mac has a keyboard, typing in fields does not automatically bring up the iOS keyboard. You can bring it up manually by typing Command-K or going to Hardward->Keyboard->Toggle Software Keyboard.

There are other useful commands in the hardware menu, including commands to rotate the device and simulator other behaviors.

You’ll also see a Devices menu there to change the iOS device being simulated, but do not use that to change the simulator device! That will restart the iOS Simulator without your app. Instead use the Xojo setting in the iOS Build Settings to select the type of device you want the iOS Simulator to simulate. You can choose from all iPhone and iPad sizes.

When you are done testing your app, you can just quit (Command-Q) the iOS Simulator to stop the debugger and return to Xojo.

For more about the iOS Simulator, refer to the Using the iOS Simulator page in the Xojo docs or review Apple’s iOS Simulator Guide.Using the iOS Documentation