Skip to content

Instantly share code, notes, and snippets.

@patrickkettner
Created August 23, 2013 20:56
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save patrickkettner/6323926 to your computer and use it in GitHub Desktop.
Save patrickkettner/6323926 to your computer and use it in GitHub Desktop.
Quick guide on settings up emulators for various mobile platforms.

iOS

Requirements

Steps

  1. Open Prefrences in XCode (XCode > Prefrences, or use ⌘, to open prefrences in pretty much all OS X programs.)

  2. Click install on any platform you want.

  3. Open the simulator from XCode > Open Developer Tools > iOS Simulator

  4. You can select older versions of the simulator, or toggle between iPhone and iPad size simulators under the hardware menu

To avoid having to open XCode everytime you want to launch the simulator, you can add a symlink to the simulator to your /Applications folder

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/

If you jam with the console cowboys in command line space, you can add an alias to your .bashrc

alias ios='open "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app"'

and now your can open the simulator by running ios in your terminal

If you need older versions of iOS, you can use a browser based service like BrowserStack, or copy over old SDK's to your XCode folder.

Android

Requirements

  • Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit), or
  • Mac OS X 10.5.8 or later (x86 only)
  • Linux (tested on Ubuntu Linux, Lucid Lynx, minimum of 8.04 is required.)
  • GNU C Library (glibc) 2.7 or later is required.
  • 64-bit distributions must be capable of running 32-bit applications.
  • JDK 6 (JRE alone is not sufficient)

SDK Install

You can grab the SDK from the offical site, however I prefer to use system downloading utilities. (If you do choose to install the package from the site, I recommend getting the one under USE AN EXISTING IDE, unless you actually want Eclipse for some ungodly reason...)

OS X

Setup homebrew, if you haven't already and run

brew install android

Windows

Setup chocolatey, and run

cinst android-sdk

Ubuntu

sudo add-apt-repository ppa:upubuntu-com/sdk
sudo apt-get update
sudo apt-get install android-sdk

Steps

  • Make sure that the android-tools and in your path (if you used the above installers, they are) and run android from the command line to open up the Android SDK Manager

  • Check off the Tools and whichever Android versions you want to test on, and click the Insatll [N] packages...

  • Select the main License group, and the Accept License radio button

  • Launch the Android Virtual Device (AVD) Manager by running

android avd
  • You can quickly create a new device by clicking on the Device Definition tab, selecting a device that represents the settings you are looking for, and clicking Create AVD

You can always manually create a device from the main tab by clicking New and filling out the information

  • Finally, just select an AVD from the list on the main tab, and hit Start Make sure you check off Launch from Snapshot. This will greatly reduce the future relaunches of that AVD. If the option is disabeled from your start menu, hit Cancel, then Edit the AVD and enable Snapshot under Emulation Options

image

Android emulators are natoriously sllooowwwwwww, due to the fact that it is based on QEMU ( which virutalizes the entire machine) and runs dalvik (android own VM).

Intel provides HAXM to accelerate QEMU, and the android emulator. Installation insturations are provided for OS X, Windows, and Linux

If you just want to check something really quickly, you can use a browser based service like BrowserStack, or manymo

Windows Phone 7

Requirements

  • Windows 7/8 (all editions except Starter Edition), Windows Vista (with Service Pack 2 – all editions except Starter Edition)
  • 4 GB of free disk space on the system drive.
  • 3 GB RAM
  • DirectX 10 or above capable graphics card with a WDDM 1.1 driver
  • If you are using trying to emulate windows whle emulating windows phone, you will need to use VM Ware Fusion, and enable Hyper-V, and assign atleast 3GBs of RAM.

Steps

  • From your Windows PC, download the Windows Phone SDK 7.1. You don't need the release notes, just vm_web2.exe

  • Launch the installation wizard, click Install, and then wait. (depending on what you have previously installed, you may be prompted to restart several times).

  • There should now be a Windows Phone Emulator program under your Start Menu image

You may get a notice that your "computer does not have the required graphics processing unit configuration."

You can safely ignore this, just click yes and proceed.

Windows Phone 8

Requirements

Steps

  • From your Windows PC, download the Windows Phone 8.0 SDKs, You don't need the release notes, just WPexpress_full.exe.
  • Launch the installation wizard, click Install, and then wait. (depending on what you have previously installed, you may be prompted to restart several times).
  • You can close the install prompt once it is complete, you do not need to click Launch, just close the wizard.
  • Right click the desktop, select New > Shortcut image
  • Where it says to Type the location of the item:, paste the following
"C:\Program Files (x86)\Microsoft XDE\8.0\XDE.exe" -vhd "C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images\Flash.vhd"
  • Click next, name the shortcut whatever you wish.
  • Double click to run the emulator. It may take several minutes to start up.

If the emulator fails with generic error on a VM, you will need to edit the configuration file of that VM.

  • Stop the virtual machive.
  • In VMWare, right click the VM, and select Show in Finder
  • In Finder, right click the virutal machine package, and select Show Package Contents
  • Find the .vmx file, and open it in your favorite editor.
  • Add the following at the bottom of the file
vhv.enable = "TRUE"
hypervisor.cpuid.v0 = "FALSE"

Restart the VM, and rerun the command prompt call to open the emulator.

BlackBerry

Requirements

VMWare player, if you are on Windows or Linux, VMWare Fusion, if you are on a Mac

###Steps

  • Download the BlackBerry 10 simulator for your system.

  • Complete the wizard, make sure to take note of the Installation Folder image

  • Open that directory after installation is complete in your file explorer, double click to launch the emulator in VMWare.

If you will be doing quite a bit of work, make sure to enable hardware acceleration to quicken things up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment