Code diff:
```diff
@@ -85,7 +85,11 @@ public class iOSExitCodeDetector : ExitCodeDetector, IiOSExitCodeDetector
 {
     // Example line coming from the mlaunch log
     // [07:02:21.6637600] Application 'net.dot.iOS.Simulator.PInvoke.Test' terminated (with exit code '42' and/or crashing signal ').
-    private Regex DeviceExitCodeRegex { get; } = new Regex(@"terminated \(with exit code '(?<exitCode>-?[0-9]+)' and/or crashing signal", RegexOptions.Compiled);
+    private Regex[] DeviceExitCodeRegexes { get; } = new Regex[]
+    {
+        new Regex(@"terminated \(with exit code '(?<exitCode>-?[0-9]+)' and/or crashing signal", RegexOptions.Compiled),
+        new Regex(@"Failed to execute 'devicectl':.*returned the exit code (?<exitCode>\d+)\.", RegexOptions.Compiled)
```

Previous comments:
- kotlarmilos (2025-06-09T12:03:54Z): @rolfbjarne This is a new error from mlaunch on iOS version >= 18:
```
>xcrun devicectl -j /var/folders/8n/dp1wz0dx39bbqz2gttfdjvnh0000gn/T/tmphuas47.tmp -v device process launch --terminate-existing --device ... --console net.dot.iOS.Simulator.PInvoke.Test
	Using verbose logging.
	2025-06-09 13:07:29.879+0200  Acquired tunnel connection to device.
	2025-06-09 13:07:29.952+0200  Enabling developer disk image services.
	2025-06-09 13:07:29.996+0200  Acquired usage assertion.
	Launched application with net.dot.iOS.Simulator.PInvoke.Test bundle identifier.
	Waiting for the application to terminate…
	2025-06-09 13:07:35.749 iOS.Simulator.PInvoke.Test[2674:336811] Done!
	The app terminated with the exit code 42.
	Saving JSON output file to /var/folders/8n/dp1wz0dx39bbqz2gttfdjvnh0000gn/T/tmphuas47.tmp
	
	Command Completed, took 10.842 seconds
	
error HE1045: Failed to execute 'devicectl': 'devicectl -j /var/folders/8n/dp1wz0dx39bbqz2gttfdjvnh0000gn/T/tmphuas47.tmp -v device process launch --terminate-existing --device ... --console net.dot.iOS.Simulator.PInvoke.Test' returned the exit code 42.
error HE1046: Additional output: xcrun devicectl -j /var/folders/8n/dp1wz0dx39bbqz2gttfdjvnh0000gn/T/tmphuas47.tmp -v device process launch --terminate-existing --device ... --console net.dot.iOS.Simulator.PInvoke.Test
error HE1046: Additional output: Using verbose logging.
error HE1046: Additional output: 2025-06-09 13:07:29.879+0200  Acquired tunnel connection to device.
error HE1046: Additional output: 2025-06-09 13:07:29.952+0200  Enabling developer disk image services.
error HE1046: Additional output: 2025-06-09 13:07:29.996+0200  Acquired usage assertion.
error HE1046: Additional output: Launched application with net.dot.iOS.Simulator.PInvoke.Test bundle identifier.
error HE1046: Additional output: Waiting for the application to terminate…
error HE1046: Additional output: 2025-06-09 13:07:35.749 iOS.Simulator.PInvoke.Test[2674:336811] Done!
error HE1046: Additional output: The app terminated with the exit code 42.
error HE1046: Additional output: Saving JSON output file to /var/folders/8n/dp1wz0dx39bbqz2gttfdjvnh0000gn/T/tmphuas47.tmp
error HE1046: Additional output: 
error HE1046: Additional output: Command Completed, took 10.842 seconds
error HE1046: Additional output: 
```
- akoeplinger (2025-06-10T12:44:41Z): just to be clear, this app is explicitly exiting with code 42.
- kotlarmilos (2025-06-10T16:53:15Z): Correct, it is invoked via mlaunch. However, the following mlaunch command runs `xcrun devicectl ..` and returns exit code 1:
```
./artifacts/obj/Microsoft.DotNet.XHarness.CLI/mlaunch/bin/mlaunch --sdkroot /Applications/Xcode.app --disable-memory-limits --devname ... --launchdevbundleid net.dot.iOS.Simulator.PInvoke.Test --wait-for-exit
```

The workaround is to search for successful logs even if mlaunch returns an error.

Please write a code review comment for the above diff:
I think the exit code detection has always been tricky. I think log detection is the only thing close to reliable.