Skip to content

Handling iOS Simulators in Xcode and Xojo

When developing iOS apps with Xojo you may spend a good amount of time debugging, whether in a iPhone, or iPad simulator or on a real device. With this in mind, let’s learn a good way to handle the Simulators list in Xcode and Xojo.

Let’s start at the beginning. If you are developing for iOS in Xojo, then you already know that development only can be done from a Mac and that the installation of Xcode is required. In fact, Xcode is what provides the toolchain used by Xojo. This toolchain includes the ability to debug your iOS projects from the Xojo IDE on any of the installed iOS / iPadOS Simulators.

By default, when installing Xcode on macOS it includes a set of Simulators. Which Simulators are installed depends on a series of factors including: the version of macOS, the version of Xcode you have and the iOS SDK that is installed by Xcode itself.

Let’s look into this more using an example. If your computer has Ventura 13.0 installed then there is a good chance that you have Xcode 14.3 installed (the macOS version determines the most recent Xcode version you are allowed to install on the computer). And having Xcode 14.3 installed means that the default iOS is 16.4 SDK, and this SDK supports Simulators ranging from iOS 13.7 to 16.4.

In this example, in Xojo under the Project > Run On menu, you see the following Simulators available in xCode:

To offer a broader view of how the macOS version, Xcode version and SDK / Simulators are interrelated, the following table includes some of these combinations (you can refer to a more complete table in this webpage from the Apple Website, under the “Minimum requirements and supported SDKs” section):

Xcode VersionMinimum OS RequiredSDKDeployment TargetsSimulator
Xcode 14.3*macOS Ventura 13.0iOS 16.4iOS 11-16.4
iPadOS 13-16.4
iOS 13.7-16.4
Xcode 14.2macOS Monterey 12.5iOS 16.2iOS 11-16.2
iPadOS 13-16.2
iOS 12.4-16.2
Xcode 14.1macOS Monterey 12.5iOS 16.1iOS 11-16.1
iPadOS 13-16.1
iOS 12.4-16.1
Xcode 14.0.xmacOS Monterey 12.5iOS 16iOS 11-16
iPadOS 13-16
iOS 12.4-16
Xcode 13.4macOS Monterey 12iOS 15.5iOS 9-15.5
iPadOS 13-15.5
iOS 12.4-15.5
Xcode 13.3macOS Monterey 12iOS 15.4iOS 9-15.4
iPadOS 13-15.4
iOS 12.4-15.4
Xcode 13.2macOS Big Sur 11.3iOS 15.2iOS 9-15.2
iPadOS 13-15.2
iOS 10.3.1-15.2

Installing Previous SDKs

If you need to debug your Xojo iOS project using older versions of the SDK / iOS, you can install older SDKs. You can do this the long way, going to Window > Devices and Simulators menu option in Xcode or, the short way, through Preferences > Platforms. We will take the long way in this example in order to make you familiar with the Simulators and Devices window too.

Once the Devices and Simulators window is displayed, select the Simulators tab and click then the “+” button in the lower left corner of the Simulators panel. This action will bring up the following dialog:

Select the “Download More Runtimes” option in the OS Version popup. This will open a new dialog where you will be able to select and install a new SDK version to Xcode. This is the panel you can access directly from Preferences > Platforms (the aforementioned short way):

Once there, click on the “+” button in the lower left corner of the window and select the “iOS…” option. This will bring you to a new panel where, finally, you will be able to select and install a different SDK version for the iOS platform. Once selected, click the “Download & Install” button.

Once the process has been completed, the different default set of Simulators will be available under the Simulators tab from the Devices and Simulators window and also from the Project > Run On… menu option in Xojo:

Adding a Specific iPhone/iPad model and iOS version combo

Besides the Simulators installed by default, you can add any additional iPhone or iPad model under any of the already available SDKs. To do that, click the “+” button from the Simulators section under the Simulators and Devices window. Select the model from the Device Type popup menu, and the iOS version from the OS version popup menu.

Once you confirm the selection, you will see it available as a new Simulator device both for Xcode and Xojo.

Too many simulator options now? If you feel that the Simulators list is too long or you want to recover some storage space from your computer hard drive or SSD (each Simulator and SDK takes a good slice out of your computer storage!), you can remove them from the Devices and Simulators window in Xcode. Xojo will reflect that change next time you select the Project > Run on… menu option.

Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón, Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at @XojoES or on the Xojo Forum.