@@ -22,8 +22,11 @@ import {
2222} from './app-monitor.js' ;
2323import { assertLibimobiledeviceInstalled } from './libimobiledevice.js' ;
2424import { HarnessAppPathError } from './errors.js' ;
25+ import { logger } from '@react-native-harness/tools' ;
2526import fs from 'node:fs' ;
2627
28+ const iosInstanceLogger = logger . child ( 'ios-instance' ) ;
29+
2730const getHarnessAppPath = ( ) : string => {
2831 const appPath = process . env . HARNESS_APP_PATH ;
2932
@@ -56,15 +59,30 @@ export const getAppleSimulatorPlatformInstance = async (
5659 const simulatorStatus = await simctl . getSimulatorStatus ( udid ) ;
5760 let startedByHarness = false ;
5861
62+ iosInstanceLogger . debug (
63+ 'resolved iOS simulator %s with status %s' ,
64+ udid ,
65+ simulatorStatus
66+ ) ;
67+
5968 if (
6069 ! simctl . isBootedSimulatorStatus ( simulatorStatus ) &&
6170 ! simctl . isBootingSimulatorStatus ( simulatorStatus )
6271 ) {
72+ iosInstanceLogger . debug (
73+ 'booting iOS simulator %s from status %s' ,
74+ udid ,
75+ simulatorStatus
76+ ) ;
6377 await simctl . bootSimulator ( udid ) ;
6478 startedByHarness = true ;
6579 }
6680
6781 if ( ! simctl . isBootedSimulatorStatus ( simulatorStatus ) ) {
82+ iosInstanceLogger . debug (
83+ 'waiting for iOS simulator %s to finish booting' ,
84+ udid
85+ ) ;
6886 await simctl . waitForBoot ( udid ) ;
6987 }
7088
0 commit comments