Repository navigation
feat: support Apple TV, Apple Watch, and Apple Vision Pro simulator slimming - #54
Merged
Merged
Conversation
Contributor
|
Thank you for this PR! The Your validation covers watchOS on a real simulator, so I had the tvOS side checked as well. A tvOS 27.0 simulator slimmed with this branch boots to the normal Home screen. The Siri Remote still moves focus and selects inside an app, and the app still sees the remote as a game controller, even though I opened #56 on top of your branch. It adds visionOS support and a faster |
…oot slims (#56) * perf: stop a no-reboot slim's daemons with one launchctl spawn `on --no-reboot` runs a `launchctl disable` and a `launchctl bootout` spawn per label, 340 spawns for the full 170-label profile. A spawn is cheap on a quiet Mac but can take seconds on a host busy with other simulators and builds, and a live slim then needs minutes. `launchctl unload -w` takes many job plists at once: it writes the same persistent disable override as `disable` and removes the loaded job like `bootout`. Simulator processes see the host file system, so the plists under the runtime's RuntimeRoot can be passed by path, in chunks of 64. `Device` now carries its `RuntimeID` to find that RuntimeRoot. A plist is only used when its own `Label` key matches the label, so a misnamed file can never unload a daemon outside the allowlist. The state is read back afterwards (`print-disabled` and `launchctl list`), and anything still enabled or loaded takes the existing per-label path. A chunk that outlasts its spawn timeout ends the batch, so a slow host keeps its remaining budget for that path. * feat: support Apple Vision Pro simulator slimming Builds on the Apple TV and Apple Watch support: CoreSimulator names the visionOS runtime `xrOS`, so `parseRuntime` now maps it to the `visionOS` platform, and every command, the JSON output, and the macOS app pick it up through the existing platform plumbing. **visionOS keeps `com.apple.mobileassetd` enabled.** The simulated surroundings and the Home View are mobile assets. With mobileassetd disabled a visionOS 27.0 simulator boots to a black space with no Home View, while apps still launch, so a boot check alone does not notice it. `desiredForDevice` skips it like homed on watchOS, so slimming, verification, status totals, and the app's count agree, and a device slimmed before this exception gets the service back on its next `on`. **Persistence gate.** visionOS 2.5 is the release generation of iOS 18.5, following the tvOS and watchOS cutoffs. Like those, it is not an independent measurement; every platform is still read back after boot.
…S no-reboot cutoff EnableSlimNoReboot already resolves the device, so unloadInBatch takes its RuntimeID instead of running a second simctl list. listDevicesInSet sets RuntimeID in its main loop, and the --no-reboot help names visionOS < 2.5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apple TV, Apple Watch, and Apple Vision Pro simulators were filtered out during discovery, so none of the slimming commands could target them. Discover iOS, tvOS, watchOS, and visionOS devices across all supported device sets and carry platform metadata through JSON, CLI tables, and the macOS app.
com.apple.homedenabled on watchOS: the watchOS 26.5 smoke test showed that the system re-enables it after startup. Use the resulting 169-label profile consistently for slimming, verification, status, and app counts.xrOS, soparseRuntimemaps it tovisionOS. Keepcom.apple.mobileassetdenabled there, because the simulated surroundings are mobile assets; without it the device boots into a black space around the Home View while apps still launch.on --no-reboot(feat: support Apple Vision Pro simulator slimming and speed up no-reboot slims #56): onelaunchctl unload -wper 64 job plists stops most labels at once. A plist is used only when its ownLabelmatches, and the state is read back so anything the batch missed takes the existing per-label disable + bootout path.EnableSlimNoRebootalready resolved instead of listing devices again, and the--no-reboothelp names the visionOS cutoff.Validation:
make checkpasses (Go tests/vet, Swift formatting, shell syntax, plist validation), locally and in CI.make appandcodesign --verify --deep --strictpass.on --no-rebootstopped 86/170 services in one batch and verified slim (170/170); a rerun took 3 s and reported everything already stopped. watchOS 27.0 batched 100/169 and verified slim (169/169). Both restored withoff.offrestores stock.The tvOS 18.5, watchOS 11.5, and visionOS 2.5 persistence cutoffs follow the corresponding iOS release generation; those earliest runtimes have not been independently smoke-tested. Every platform retains post-boot override verification.