#!/bin/bash # This script archive 2 things here # 1. boot the fresh simulator once, so we can reduce the boot time in UI test # 2. Simulator shows swipe tutorial on first use of keyboard (iOS13 above), this script will set simulator preferences so it wont show the tutorial function get_simulator_udid() { echo '' | xcrun simctl list devices | grep "iPhone" | grep -v "unavailable" | awk -F "[()]" '{ for (i=2; i> /dev/null 1>>/dev/null echo "Update simulator preferences $uuid" # set preferences to skip showing the swipe tutorial xcrun simctl spawn $uuid defaults write com.apple.Preferences DidShowContinuousPathIntroduction 1 echo "shutdown $uuid" xcrun simctl shutdown $uuid done done <<< "$simulators" )