Setting up Android and iOS emulators

Diogo Spínola
3 min readJul 2, 2017

--

I don’t usually develop for mobile but when I do, one of the things that I tend to inevitably waste quite some time at is making sure the emulators are up and running so the tests for various devices can be done faster.

Fortunately it has been made easier over the last years but I always get stuck somehow so this time I decided to write this article with the steps to get things running and hopefully help somebody else setting things up.

The emulators were tested in macOS 10, for android I believe the process is basically the same in windows for iOS, I would recommend checking alternatives like Xamarin Testflight.

Android (Android Studio 2.3.3)

  • Install Android Studio;
  • Open it and create a sample project
  • On the menu go to “Tools > Android > Avd Manager”;
  • Create a new virtual device with the OS version that you want, if you don’t have it installed from the SDK Manager a “download” button should appear;
  • Run it from the Android virtual Device Manager, it may takes a couple minutes.

For those of you having and hard time finding the avd and sdk manager from the command line it should be located in:

$HOME/Library/Android/sdk/tools/bin

There you can find both avdmanager and sdkmanager executables if you wish to use the command line to create and manage your emulators.

To run two emulators just configure two different devices and run them

Nexus 4 and 6 emulators

iOS (Xcode 8.3.3)

For iOS apple gives us the “Simulator” which comes with Xcode and the setup is pretty straightforward in comparison with android, so to open it in standalone just:

  • Install Xcode;
  • Open it and create a new sample project
  • Click on the menu “Xcode > Open Developer Tool > Simulator”;
  • Wait a couple of seconds and you should have your emulator up and running.

You can also open the emulator from the command line with:

open -a Simulator

To open multiple emulators you can followup with:

cd /Applications/Xcode.app/Contents/Developer/Applicationsopen -n Simulator.app

A warning will show up saying the the emulator is already booted, just select another hardware device in the Simulator menu.

Running emulators side by side

Article 3 of 30, part of a project for publishing an article at least once a week, from idle thoughts to tutorials. Leave a comment, follow me on Diogo Spínola and then go back to your brilliant project!

--

--

Diogo Spínola

Learning enthusiast, web engineer and writer of programming stuff that calls to my attention