|  | @@ -9,14 +9,17 @@ function run() {
 | 
	
		
			
			| 9 | 9 |    try {
 | 
	
		
			
			| 10 | 10 |      startRecording();
 | 
	
		
			
			| 11 | 11 |      const conf = release ? `release` : `debug`;
 | 
	
		
			
			| 12 |  | -    exec.execSync(`detox build --configuration ios.sim.${conf} && detox test --configuration ios.sim.${conf} ${process.env.CI ? '--cleanup' : ''}`);
 | 
	
		
			
			|  | 12 | +    exec.execSync(`detox build --configuration ios.sim.${conf}`);
 | 
	
		
			
			|  | 13 | +    exec.execAsync(`sleep 30`).then(() => {
 | 
	
		
			
			|  | 14 | +      exec.execAsync(`open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app`);
 | 
	
		
			
			|  | 15 | +    });
 | 
	
		
			
			|  | 16 | +    exec.execSync(`detox test --configuration ios.sim.${conf} ${process.env.CI ? '--cleanup' : ''}`);
 | 
	
		
			
			| 13 | 17 |    } finally {
 | 
	
		
			
			| 14 | 18 |      stopRecording();
 | 
	
		
			
			| 15 | 19 |    }
 | 
	
		
			
			| 16 | 20 |  }
 | 
	
		
			
			| 17 | 21 |  
 | 
	
		
			
			| 18 | 22 |  function startRecording() {
 | 
	
		
			
			| 19 |  | -  exec.execAsync(`open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app`);
 | 
	
		
			
			| 20 | 23 |    const screenId = exec.execSyncRead(`ffmpeg -f avfoundation -list_devices true -i "" 2>&1 | grep "Capture screen 0" | sed -e "s/.*\\[//" -e "s/\\].*//"`);
 | 
	
		
			
			| 21 | 24 |    exec.execAsync(`ffmpeg -f avfoundation -i "${screenId}:none" out.avi`);
 | 
	
		
			
			| 22 | 25 |  }
 |