How to create shortcut to launch emulator and Simulator ?


To create shortcut for emulator launch
  
  STEP 1: Identify list of emualtors available into system
  
  Open Terminal and execute following command
  
  emulator -list-avds
  
  ouput :
  
  
STEP 2: Create a batch file to launch emulator Open TextEdit Add following commands Note: Add emulator name which we want to launch
And Save file as text file STEP 3: Provide persmission to launch file using bash shell First go to the directory where file has saved cd /Users/apple/Desktop/DeviceLaunch/
Then provide permissions chmod +x ./androidAPI31device.txt Note: This will give exec permission to user, group and other, so beware of possible security issues. So we can use chmod u+x ./androidAPI31device.txt, This will grant exec permission only to user
STEP 4: Set default file open in Terminal Right Click on file -> Open with " Other "-> Enable " All files" option-> Search " Terminal " -> Ticked always open with option and Click on Open StEP 3: Launch Emulator Just dobule clicked on the file and emulator will be launched
To create shortcut for simulator launch STEP 1: Identify list of emualtors available into system Open Terminal and execute following command xcrun simctl list ouput :
STEP 2: Create a batch file to launch simulator Open TextEdit Add following commands #! /bin/bash open -a Simulator.app
STEP 3: Provide persmission to launch file using bash shell First go to the directory where file has saved cd /Users/apple/Desktop/DeviceLaunch/
Then provide permissions chmod +x ./iOS14_5Simulator.txt STEP 4: Set default file open in Terminal Right Click on file -> Open with " Other "-> Enable " All files" option-> Search " Terminal " -> Ticked always open with option and Click on Open StEP 3: Launch Simulator Just dobule clicked on the file and Simulator will be launched