Skip to content

Commit a44a1e3

Browse files
committed
Revert "ci: pre-disable simulator watchdogs before boot"
This reverts commit 2fb862a.
1 parent d10ed15 commit a44a1e3

File tree

2 files changed

+0
-46
lines changed

2 files changed

+0
-46
lines changed

scripts/device-test-utils.ps1

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -26,49 +26,6 @@ function Get-AndroidEmulatorId
2626
}
2727
}
2828

29-
# mlaunch (inside xharness) checks if simulator watchdogs are disabled before
30-
# launching an app. If not, it shuts down the sim, writes plist files, then
31-
# reboots via Simulator.app — but simctl still sees it as Shutdown, so the
32-
# launch fails. The CI log sequence:
33-
#
34-
# dbug: Xamarin.Hosting: Simulator watchdogs are not disabled for 'iPhone 17 (...)'
35-
# dbug: Xamarin.Hosting: Shutting down simulator...
36-
# dbug: Xamarin.Hosting: Successfully disabled simulator watchdogs for 'iPhone 17 (...)'
37-
# dbug: Xamarin.Hosting: Launching simulator application 'com.apple.iphonesimulator'
38-
# dbug: Xamarin.Hosting: Ready notification 'com.apple.iphonesimulator.ready' received from the simulator.
39-
# dbug: Unable to lookup in current state: Shutdown
40-
# dbug: error HE0042: Could not launch the app '...' on the device '...': simctl returned exit code 149
41-
# dbug: Process mlaunch exited with 1
42-
#
43-
# By pre-writing the watchdog plists before booting, mlaunch sees watchdogs
44-
# already disabled and skips its shutdown/reboot dance entirely.
45-
function Disable-IosSimulatorWatchdogs {
46-
param(
47-
[Parameter(Mandatory)]
48-
[string]$Udid
49-
)
50-
$prefsPath = "$HOME/Library/Developer/CoreSimulator/Devices/$Udid/data/Library/Preferences"
51-
New-Item -ItemType Directory -Force -Path $prefsPath | Out-Null
52-
$keys = @(
53-
'FBLaunchWatchdogScale',
54-
'FBLaunchWatchdogFirstPartyScale',
55-
'FBLaunchWatchdogResumeScale',
56-
'FBLaunchWatchdogScaleOverride',
57-
'FBLaunchWatchdogFirstPartyScaleOverride',
58-
'FBLaunchWatchdogResumeScaleOverride'
59-
)
60-
foreach ($plist in @('com.apple.springboard.plist', 'com.apple.frontboard.plist')) {
61-
$plistPath = "$prefsPath/$plist"
62-
if (-not (Test-Path $plistPath)) {
63-
/usr/bin/plutil -create xml1 $plistPath
64-
}
65-
foreach ($key in $keys) {
66-
/usr/libexec/PlistBuddy -c "Delete :$key" $plistPath 2>&1 | Out-Null
67-
/usr/libexec/PlistBuddy -c "Add :$key real 100" $plistPath
68-
}
69-
}
70-
}
71-
7229
function Get-IosSimulatorUdid {
7330
[CmdletBinding()]
7431
param(

scripts/device-test.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ try
6464

6565
$udid = Get-IosSimulatorUdid -Verbose
6666
if ($udid) {
67-
if ($CI -and $Run) {
68-
Disable-IosSimulatorWatchdogs -Udid $udid
69-
}
7067
$arguments += @('--device', $udid)
7168
} else {
7269
Write-Host "No suitable simulator found; proceeding without a specific --device"

0 commit comments

Comments
 (0)