Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Shorten New Machine to one page with Advanced Options, cap sheet height

Jackyf5de67eb5308
diff --git a/Documents/Guides/create-and-run.md b/Documents/Guides/create-and-run.md
index 38ac1568..cade1e7c 100644
--- a/Documents/Guides/create-and-run.md
+++ b/Documents/Guides/create-and-run.md
@@ -128,7 +128,7 @@ It works out the key as `vm create` does. The builds come from the IPSWs when th
### In Launchpad
-Launchpad 2.9 creates machines from templates by default. New Machine has a Slim System switch on its General page and the parts on its Template page: the trim tier and kept languages, the service profile, Apple Account, and which system apps go. Turning off Create from a template restores the machine on its own, as `--no-template` does, with keys of its own and without slimming.
+Launchpad 2.9 creates machines from templates by default. New Machine opens on a short page: the name, the device and iOS version from the firmware catalog, and a Slim System switch. A row below it sums up the rest and opens Advanced Options, four pages for hardware; the template and its parts (the trim tier and kept languages, the service profile, and which system apps go); the Core Bundle, custom IPSWs and patches; and the location, network and restore options. The row counts the settings that differ from the defaults and names anything there that stops Create. Turning off Create from a template restores the machine on its own, as `--no-template` does, with keys of its own and without slimming. Apple Account is not offered: the guest refuses its sign-in either way, so Launchpad passes `--accounts-off` whenever the service profile is trimmed. The sheet grows with its page up to 600 points and scrolls past that, so its buttons stay on a laptop screen.
The creation runs `vm template find` first. When a current template matches, it clones the machine (`vm create --template <id> --skip-first-boot`) and boots it. When none does, it builds the template in a temporary machine of the same library, named `template-` and eight hex digits, with its usual steps (restore, then `cfw install` through the helper), then `vm template trim`, the headless `vm template setup --strict` and `vm template adopt --iphone-source … --cloudos-source … --expect <id>`, and clones the machine from the result. The setup boot fails when an app it should remove stays, and the adopt fails when the build's key comes out other than the one `find` computed, so a build is never saved under an id later creations would not find. Each is a step of its own with its duration, and a failed one shows the reason `vphone-cli` gave.
diff --git a/Documents/Guides/launchpad-cli.md b/Documents/Guides/launchpad-cli.md
index b8b6a5e5..99ad4d54 100644
--- a/Documents/Guides/launchpad-cli.md
+++ b/Documents/Guides/launchpad-cli.md
@@ -113,7 +113,7 @@ version while a machine is bound to it; rebind or delete those machines first.
| `vm list` | Machines in every library with run state, Core Bundle and log path. Only a VM process holding the disk (`vphone-vm`, or Virtualization's VM service) makes a machine `running`; any other process that has it open (`tail`, Spotlight, a backup tool) is listed in `diskOpenIn` (`12925 tail`) and leaves it `stopped` |
| `vm start <name> [--headless] [--wait]` / `vm stop <name>` | Launch with the machine's bundle, or stop; `--wait` waits for vphoned. Stop asks the guest to shut down (vphoned `system.shutdown`) and waits up to 30 s; when the guest cannot be asked or does not stop, it ends the virtual machine as before. Like `vphone-cli vm launch`, start is not refused by a process that only has the disk open; it prints a note naming it |
| `vm wait <name>` / `vm log <name> [--kind create\|dfu\|patch]` | Wait for vphoned; read a console log |
-| `vm create <name> [--bundle <version>] [...] [--device <product-type>] [--preset <preset>] [--block <patch>]... [--allow <patch>]... [--no-template \| --slim on\|off --trim … --keep-languages … --service-profile … --remove-apps … --keep-apps … --accounts-off] [--from <step>]` | The New Machine pipeline, bound to `--bundle` or the default: cloned from a template, built first when missing (2.9), or restored on its own with `--no-template`; the slimming switches are `vphone-cli vm create`'s. `--block`/`--allow` (repeatable) turn one patch of the preset off or on, as New Machine's patch list and `vphone-cli fw set-patches` do (see below). `--device` makes an iPad guest, `--from` retries from a step (`findTemplate` … `firstBoot`) with the options the creation started with; the result names the template, whether this creation built it, and the patches it used |
+| `vm create <name> [--bundle <version>] [...] [--device <product-type>] [--preset <preset>] [--block <patch>]... [--allow <patch>]... [--no-template \| --slim on\|off --trim … --keep-languages … --service-profile … --remove-apps … --keep-apps … --accounts-off] [--from <step>]` | The New Machine pipeline, bound to `--bundle` or the default: cloned from a template, built first when missing (2.9), or restored on its own with `--no-template`; the slimming switches are `vphone-cli vm create`'s, except that Apple Account goes with the trimmed service profile as in New Machine (`--accounts-off` is accepted and changes nothing). `--block`/`--allow` (repeatable) turn one patch of the preset off or on, as New Machine's patch list and `vphone-cli fw set-patches` do (see below). `--device` makes an iPad guest, `--from` retries from a step (`findTemplate` … `firstBoot`) with the options the creation started with; the result names the template, whether this creation built it, and the patches it used |
| `vm set-bundle <name> <version> [--update-environment]` | Bind a machine to another installed version. `--update-environment` also redeploys that version's guest environment and needs a stopped machine; a disk another process has open refuses it, naming that process, before the binding changes. If the update itself fails, the machine stays bound to the new version and `vm list` still shows the old `guestEnvironmentBundle`: run `cfw update-environment` to finish |
| `vm leases [--release]` | DHCP leases on the shared NAT network and the machine that owns each. `--release` frees the ones no machine in any library uses, through the helper (see [Networking](networking.md#addresses-held-by-old-macs)) |
| `cfw install <name>` | Install CFW into a stopped machine with its own bundle, through the helper. The helper puts temporary work files on the VM library's external volume when applicable. It and the two updates below refuse a disk another process has open, naming it (`12925 tail`). |
diff --git a/VPhoneLaunchpad/Tests/TemplatesTests.swift b/VPhoneLaunchpad/Tests/TemplatesTests.swift
index b09a7686..759e8013 100644
--- a/VPhoneLaunchpad/Tests/TemplatesTests.swift
+++ b/VPhoneLaunchpad/Tests/TemplatesTests.swift
@@ -21,8 +21,9 @@ struct TemplatesTests {
static func slimmingArguments() {
let standard = VPhoneLaunchpadSlimming()
- precondition(standard.arguments.isEmpty, "The defaults pass nothing: \(standard.arguments)")
- precondition(standard.setupArguments.isEmpty, "Setup takes the defaults too")
+ // Apple Account is always off; every other default is the CLI's own.
+ precondition(standard.arguments == ["--accounts-off"], "The defaults pass only --accounts-off: \(standard.arguments)")
+ precondition(standard.setupArguments == ["--accounts-off"], "Setup takes the defaults too")
precondition(standard.trimArguments == ["--tier", "standard"], "Standard trim: \(standard.trimArguments ?? [])")
precondition(standard.removedApps.count == 10, "Ten apps go by default")
precondition(!standard.removedApps.contains("com.apple.camera") && !standard.removedApps.contains("com.apple.mobilephone"),
@@ -57,8 +58,7 @@ struct TemplatesTests {
var languages = VPhoneLaunchpadSlimming()
languages.keptLanguages = " en , ja ,"
- languages.accountsOff = true
- precondition(languages.arguments == ["--keep-languages", "en,ja", "--accounts-off"], "Languages: \(languages.arguments)")
+ precondition(languages.arguments == ["--keep-languages", "en,ja", "--accounts-off"], "Languages: \(languages.arguments)")
precondition(languages.setupArguments == ["--accounts-off"], "Setup leaves the languages to the trim")
precondition(languages.trimArguments == ["--tier", "standard", "--keep-languages", "en,ja"], "Trim with languages")
languages.keptLanguages = "en,zh-Hans,zh"
@@ -71,11 +71,11 @@ struct TemplatesTests {
var noApps = VPhoneLaunchpadSlimming()
noApps.removesApps = false
noApps.keptApps = ["com.apple.news"]
- precondition(noApps.arguments == ["--remove-apps", "off"], "Remove apps off ignores the kept list")
+ precondition(noApps.arguments == ["--accounts-off", "--remove-apps", "off"], "Remove apps off ignores the kept list")
var none = VPhoneLaunchpadSlimming()
none.trim = .none
- precondition(none.arguments == ["--trim", "none"] && none.trimArguments == nil, "No trim step for tier none")
+ precondition(none.arguments == ["--trim", "none", "--accounts-off"] && none.trimArguments == nil, "No trim step for tier none")
print("Slimming switch tests passed")
}
@@ -112,7 +112,7 @@ struct TemplatesTests {
// Strict: an app the setup boot cannot remove fails the step.
precondition(VPhoneLaunchpadTemplateCommands.setup("template-1a2b3c4d", slimming)
== ["vm", "template", "setup", "template-1a2b3c4d", "--strict", "--service-profile", "none"], "setup")
- precondition(VPhoneLaunchpadTemplateCommands.setup("t", VPhoneLaunchpadSlimming()) == ["vm", "template", "setup", "t", "--strict"],
+ precondition(VPhoneLaunchpadTemplateCommands.setup("t", VPhoneLaunchpadSlimming()) == ["vm", "template", "setup", "t", "--strict", "--accounts-off"],
"setup with the defaults")
// The adopt expects the id Find Template computed.
precondition(VPhoneLaunchpadTemplateCommands.adopt("template-1a2b3c4d", iphoneSource: "i", cloudOSSource: "c", expect: "2847ec2a3e3e")
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift
index 18b738ea..af4e3328 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift
@@ -18,7 +18,7 @@
/// The source a Core Bundle sheet opens on.
static var coreBundleSource = VPhoneLaunchpadCoreBundleView.Source.releases
/// The pages New Machine and machine settings open on.
- static var newMachinePage = VPhoneLaunchpadNewMachineView.Page.general
+ static var newMachinePage = VPhoneLaunchpadNewMachineView.Page.basic
static var machineSettingsPage = VPhoneLaunchpadMachineSettingsView.Page.general
/// The patch choice New Machine opens with.
static var newMachinePatches = VPhoneLaunchpadPatchSelection()
@@ -100,16 +100,22 @@
await sheet(.newMachine, "07-new-machine", suffix)
newMachinePage = .hardware
await sheet(.newMachine, "07-new-machine-hardware", suffix)
- newMachinePage = .advanced
- await sheet(.newMachine, "07-new-machine-advanced", suffix)
+ newMachinePage = .firmware
+ await sheet(.newMachine, "07-new-machine-firmware", suffix)
+ newMachinePage = .storage
+ await sheet(.newMachine, "07-new-machine-storage", suffix)
+ newMachinePage = .firmware
// One boot-chain and one guest patch off: the guest one is
// applied to the clone, not built into the template.
newMachinePatches = VPhoneLaunchpadPatchSelection(blocked: ["ibss-cfw-serial_label", "dyld-cfw-camera"])
await sheet(.newMachine, "07c-new-machine-guest-patches", suffix)
+ // The basic page counts the patch change under Advanced Options.
+ newMachinePage = .basic
+ await sheet(.newMachine, "07d-new-machine-changed", suffix)
newMachinePatches = VPhoneLaunchpadPatchSelection()
- newMachinePage = .template
- await sheet(.newMachine, "07b-new-machine-template", suffix)
- newMachinePage = .general
+ newMachinePage = .system
+ await sheet(.newMachine, "07b-new-machine-system", suffix)
+ newMachinePage = .basic
await sheet(.creation(path("ios27-rc")), "08-creation-progress", suffix)
creation.applyPreview(.downloading(0.42))
await sheet(.creation(path("ios27-rc")), "08a-creation-downloading", suffix)
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadSheet.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadSheet.swift
index 85a1ab47..c8c2f3d6 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadSheet.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadSheet.swift
@@ -53,6 +53,43 @@ struct VPhoneLaunchpadSheet<Content: View, Accessory: View, Actions: View>: View
}
}
+// MARK: - Height
+
+enum VPhoneLaunchpadSheetHeight {
+ /// The tallest a form sheet grows, title and buttons included: a
+ /// 1440×900 screen keeps the buttons in reach below the menu bar, the
+ /// window's toolbar and the Dock.
+ static let maximum: CGFloat = 600
+ /// The sheet's title and button rows, which stay put while its form scrolls.
+ static let chrome: CGFloat = 96
+ /// A page control over the form.
+ static let pages: CGFloat = 38
+}
+
+extension View {
+ /// Gives a sheet's form the height of its content, up to `limit`, past
+ /// which the form scrolls. Unlike `fixedSize`, a tall page cannot push
+ /// the sheet's buttons off the screen.
+ func vphoneFittedHeight(limit: CGFloat) -> some View {
+ modifier(VPhoneLaunchpadFittedHeight(limit: limit))
+ }
+}
+
+private struct VPhoneLaunchpadFittedHeight: ViewModifier {
+ let limit: CGFloat
+ @State private var contentHeight: CGFloat?
+
+ func body(content: Content) -> some View {
+ content
+ .onScrollGeometryChange(for: CGFloat.self) { geometry in
+ geometry.contentSize.height + geometry.contentInsets.top + geometry.contentInsets.bottom
+ } action: { _, height in
+ contentHeight = height
+ }
+ .frame(height: min(contentHeight ?? limit, limit))
+ }
+}
+
/// A segmented control over a sheet's form that shows one page of it at a
/// time, so a sheet with several groups of settings stays short instead of
/// growing past the screen. The sheet resizes to the page, as a settings
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift
index be47ae10..a46a6c7d 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift
@@ -713,8 +713,9 @@ struct VPhoneLaunchpadControlCommands {
}
slimming.keptApps = identifiers
}
- slimming.accountsOff = request.flag("accounts-off")
- if slimming.accountsOff, !slimming.trimsServices {
+ // The Apple Account daemons go with the trimmed profile whether or
+ // not the flag is given; it is still refused where the CLI refuses it.
+ if request.flag("accounts-off"), !slimming.trimsServices {
throw VPhoneLaunchpadError("--accounts-off needs --service-profile trimmed.")
}
if let problem = slimming.problem {
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings b/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings
index a9b92f3c..f998da85 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings
@@ -375,40 +375,6 @@
}
}
},
- "About 140 launch daemons a research machine rarely needs. Each machine can switch them back on in Guest System. Without Apple Account the guest cannot sign in." : {
- "localizations" : {
- "en" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "About 140 launch daemons a research machine rarely needs. Each machine can switch them back on in Guest System. Without Apple Account the guest cannot sign in."
- }
- },
- "ja" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "研究用マシンではほとんど使わない約 140 の launch デーモンです。各マシンは「ゲストシステム」で元に戻せます。Apple アカウントをオフにすると、ゲストはサインインできません。"
- }
- },
- "ko" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "연구용 머신에 거의 필요 없는 약 140개의 launch 데몬입니다. 각 머신은 게스트 시스템에서 다시 켤 수 있습니다. Apple 계정을 끄면 게스트가 로그인할 수 없습니다."
- }
- },
- "vi" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Khoảng 140 launch daemon mà máy nghiên cứu hiếm khi cần. Mỗi máy ảo có thể bật lại chúng trong Hệ thống máy khách. Khi tắt Tài khoản Apple, máy khách không thể đăng nhập."
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "研究用虚拟机很少用到的约 140 个 launch 守护进程。每台虚拟机都可以在“客户机系统”中重新开启。关闭 Apple 账户后,客户机无法登录。"
- }
- }
- }
- },
"Allocated" : {
"localizations" : {
"en" : {
@@ -783,40 +749,6 @@
}
}
},
- "Checked apps are removed. Camera and Phone are never removed. Each machine can restore removed apps in Guest System." : {
- "localizations" : {
- "en" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Checked apps are removed. Camera and Phone are never removed. Each machine can restore removed apps in Guest System."
- }
- },
- "ja" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "チェックした App を削除します。カメラと電話は削除しません。削除した App は各マシンの「ゲストシステム」で復元できます。"
- }
- },
- "ko" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "선택한 앱이 제거됩니다. 카메라와 전화는 제거되지 않습니다. 각 머신은 게스트 시스템에서 제거된 앱을 복원할 수 있습니다."
- }
- },
- "vi" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Các ứng dụng được đánh dấu sẽ bị gỡ. Camera và Điện thoại không bao giờ bị gỡ. Mỗi máy ảo có thể khôi phục ứng dụng đã gỡ trong Hệ thống máy khách."
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "勾选的 App 会被移除。相机和电话不会被移除。每台虚拟机都可以在“客户机系统”中恢复已移除的 App。"
- }
- }
- }
- },
"Cloned from template %@, which machines with these options share." : {
"localizations" : {
"en" : {
@@ -3163,40 +3095,6 @@
}
}
},
- "System Apps" : {
- "localizations" : {
- "en" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "System Apps"
- }
- },
- "ja" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "システム App"
- }
- },
- "ko" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "시스템 앱"
- }
- },
- "vi" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Ứng dụng hệ thống"
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "系统 App"
- }
- }
- }
- },
"System Files" : {
"localizations" : {
"en" : {
@@ -3911,74 +3809,6 @@
}
}
},
- "Trims system files, unneeded services and system apps once, in the template the machine is cloned from. Choose what goes in Template." : {
- "localizations" : {
- "en" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Trims system files, unneeded services and system apps once, in the template the machine is cloned from. Choose what goes in Template."
- }
- },
- "ja" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "システムファイル、不要なサービス、システム App を、マシンの複製元のテンプレートで一度だけ削減します。対象は「テンプレート」で選択します。"
- }
- },
- "ko" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "머신을 복제하는 원본 템플릿에서 시스템 파일, 불필요한 서비스, 시스템 앱을 한 번 정리합니다. 정리할 항목은 템플릿에서 선택하십시오."
- }
- },
- "vi" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Cắt giảm tệp hệ thống, dịch vụ không cần và ứng dụng hệ thống một lần, trong mẫu mà máy ảo được nhân bản từ đó. Chọn mục cắt giảm trong Mẫu."
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "在虚拟机克隆所用的模板中一次性裁剪系统文件、不需要的服务和系统 App。在“模板”中选择要裁剪的内容。"
- }
- }
- }
- },
- "Turn off Apple Account" : {
- "localizations" : {
- "en" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Turn off Apple Account"
- }
- },
- "ja" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Apple アカウントをオフ"
- }
- },
- "ko" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Apple 계정 끄기"
- }
- },
- "vi" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Tắt Tài khoản Apple"
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "关闭 Apple 账户"
- }
- }
- }
- },
"Turn off unneeded services" : {
"localizations" : {
"en" : {
@@ -4285,40 +4115,6 @@
}
}
},
- "Without a template the machine is not slimmed. Turn templates on in Template." : {
- "localizations" : {
- "en" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Without a template the machine is not slimmed. Turn templates on in Template."
- }
- },
- "ja" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "テンプレートを使わない場合、マシンは軽量化されません。「テンプレート」でテンプレートをオンにしてください。"
- }
- },
- "ko" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "템플릿 없이 만든 머신은 간소화되지 않습니다. 템플릿에서 템플릿을 켜십시오."
- }
- },
- "vi" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Không có mẫu thì máy ảo không được tinh gọn. Hãy bật mẫu trong Mẫu."
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "不使用模板时,虚拟机不会精简。请在“模板”中开启模板。"
- }
- }
- }
- },
"^[%lld app](inflect: true) removed" : {
"localizations" : {
"en" : {
@@ -5814,40 +5610,6 @@
}
}
},
- "Advanced" : {
- "localizations" : {
- "en" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Advanced"
- }
- },
- "ja" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "詳細"
- }
- },
- "ko" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "고급"
- }
- },
- "vi" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Nâng cao"
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "高级"
- }
- }
- }
- },
"Advisory" : {
"localizations" : {
"en" : {
@@ -13119,40 +12881,6 @@
}
}
},
- "Recommended firmware pairings for %@." : {
- "localizations" : {
- "en" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Recommended firmware pairings for %@."
- }
- },
- "ja" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "%@ の推奨ファームウェアの組み合わせです。"
- }
- },
- "ko" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "%@의 권장 펌웨어 조합입니다."
- }
- },
- "vi" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Các cặp firmware khuyến nghị cho %@."
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "%@ 的推荐固件组合。"
- }
- }
- }
- },
"Releases" : {
"localizations" : {
"en" : {
@@ -18426,6 +18154,720 @@
"vi" : { "stringUnit" : { "state" : "translated", "value" : "%@ không phải là IPSW trong bộ nhớ đệm IPSW." } },
"zh-Hans" : { "stringUnit" : { "state" : "translated", "value" : "%@ 不是 IPSW 缓存中的 IPSW。" } }
}
+ },
+ "Advanced Options" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Advanced Options"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "詳細オプション"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "고급 옵션"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Tùy chọn nâng cao"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "高级选项"
+ }
+ }
+ }
+ },
+ "Basic Settings" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Basic Settings"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "基本設定"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "기본 설정"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Cài đặt cơ bản"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "基本设置"
+ }
+ }
+ }
+ },
+ "System" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "System"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "システム"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "시스템"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Hệ thống"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "系统"
+ }
+ }
+ }
+ },
+ "Firmware & Patches" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Firmware & Patches"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "ファームウェアとパッチ"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "펌웨어 및 패치"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Firmware và bản vá"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "固件与补丁"
+ }
+ }
+ }
+ },
+ "Storage & Network" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Storage & Network"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "保存先とネットワーク"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "저장 위치 및 네트워크"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Lưu trữ và mạng"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "存储与网络"
+ }
+ }
+ }
+ },
+ "^[%lld setting](inflect: true) changed" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "^[%lld setting](inflect: true) changed"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%lld 項目を変更"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%lld개 항목 변경됨"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đã thay đổi %lld mục"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "已更改 %lld 项"
+ }
+ }
+ }
+ },
+ "%lld cores · %lld GB memory · %lld GB disk" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$lld cores · %2$lld GB memory · %3$lld GB disk"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$lld コア · メモリ %2$lld GB · ディスク %3$lld GB"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$lld코어 · 메모리 %2$lld GB · 디스크 %3$lld GB"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$lld lõi · %2$lld GB bộ nhớ · %3$lld GB ổ đĩa"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$lld 核 · %2$lld GB 内存 · %3$lld GB 磁盘"
+ }
+ }
+ }
+ },
+ "Recommended firmware pairings for %@, with %@." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Recommended firmware pairings for %1$@, with %2$@."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$@ の推奨ファームウェアの組み合わせです。%2$@ と組み合わせます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$@의 권장 펌웨어 조합이며 %2$@와 함께 사용합니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Các cặp firmware khuyến nghị cho %1$@, đi kèm %2$@."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$@ 的推荐固件组合,搭配 %2$@。"
+ }
+ }
+ }
+ },
+ "Choose an iPhone IPSW and a cloudOS IPSW in Advanced Options." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Choose an iPhone IPSW and a cloudOS IPSW in Advanced Options."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "「詳細オプション」で iPhone IPSW と cloudOS IPSW を選択してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "고급 옵션에서 iPhone IPSW와 cloudOS IPSW를 선택하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Chọn IPSW iPhone và IPSW cloudOS trong Tùy chọn nâng cao."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "请在“高级选项”中选择 iPhone IPSW 和 cloudOS IPSW。"
+ }
+ }
+ }
+ },
+ "Without a template the machine is not slimmed. Turn templates on in Advanced Options." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Without a template the machine is not slimmed. Turn templates on in Advanced Options."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "テンプレートを使わない場合、マシンは軽量化されません。「詳細オプション」でテンプレートをオンにしてください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "템플릿 없이 만든 머신은 간소화되지 않습니다. 고급 옵션에서 템플릿을 켜십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Không có mẫu thì máy ảo không được tinh gọn. Hãy bật mẫu trong Tùy chọn nâng cao."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "不使用模板时,虚拟机不会精简。请在“高级选项”中开启模板。"
+ }
+ }
+ }
+ },
+ "Cloned from a shared template that trims system files, unneeded services and system apps once. Setup Assistant is skipped." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Cloned from a shared template that trims system files, unneeded services and system apps once. Setup Assistant is skipped."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "システムファイル、不要なサービス、システム App を一度だけ削減した共有テンプレートから複製します。設定アシスタントはスキップされます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "시스템 파일, 불필요한 서비스, 시스템 앱을 한 번 정리한 공유 템플릿에서 복제합니다. 설정 지원은 건너뜁니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nhân bản từ một mẫu dùng chung đã cắt giảm tệp hệ thống, dịch vụ không cần và ứng dụng hệ thống một lần. Trợ lý thiết lập được bỏ qua."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "从共享模板克隆,模板只裁剪一次系统文件、不需要的服务和系统 App。会跳过设置助理。"
+ }
+ }
+ }
+ },
+ "The machine is created in a folder named after it inside this location." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "The machine is created in a folder named after it inside this location."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "マシンは、この場所の中にマシン名のフォルダとして作成されます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "머신은 이 위치 안에 머신 이름으로 된 폴더로 생성됩니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Máy ảo được tạo trong một thư mục mang tên của nó, bên trong vị trí này."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "虚拟机会创建在此位置下以其名称命名的文件夹里。"
+ }
+ }
+ }
+ },
+ "These two files replace the device and version chosen on the basic page." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "These two files replace the device and version chosen on the basic page."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "この 2 つのファイルが、基本設定で選んだデバイスとバージョンの代わりに使われます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "이 두 파일이 기본 설정에서 선택한 기기와 버전을 대신합니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Hai tệp này thay cho thiết bị và phiên bản đã chọn trong cài đặt cơ bản."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "这两个文件会取代基本设置中选择的设备和版本。"
+ }
+ }
+ }
+ },
+ "The device and version are chosen on the basic page; cloudOS goes with them." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "The device and version are chosen on the basic page; cloudOS goes with them."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "デバイスとバージョンは基本設定で選択し、cloudOS はそれに合わせて決まります。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "기기와 버전은 기본 설정에서 선택하며, cloudOS는 그에 맞춰 정해집니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Thiết bị và phiên bản được chọn trong cài đặt cơ bản; cloudOS đi kèm theo đó."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "设备和版本在基本设置中选择,cloudOS 随之匹配。"
+ }
+ }
+ }
+ },
+ "Slim System is off, so the template keeps every file, service and app." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Slim System is off, so the template keeps every file, service and app."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "「システムを軽量化」がオフのため、テンプレートはすべてのファイル、サービス、App を保持します。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "시스템 간소화가 꺼져 있으므로 템플릿은 모든 파일, 서비스, 앱을 유지합니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Tinh gọn hệ thống đang tắt, nên mẫu giữ lại mọi tệp, dịch vụ và ứng dụng."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "“精简系统”已关闭,模板会保留所有文件、服务和 App。"
+ }
+ }
+ }
+ },
+ "Services and Apps" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Services and Apps"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "サービスと App"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "서비스 및 앱"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Dịch vụ và ứng dụng"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "服务与 App"
+ }
+ }
+ }
+ },
+ "About 140 launch daemons a research machine rarely needs, Apple Account's among them." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "About 140 launch daemons a research machine rarely needs, Apple Account's among them."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "研究用マシンではほとんど使わない約 140 の launch デーモンで、Apple アカウント関連のものも含みます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "연구용 머신에 거의 필요 없는 약 140개의 launch 데몬이며, Apple 계정 관련 데몬도 포함됩니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Khoảng 140 launch daemon mà máy nghiên cứu hiếm khi cần, gồm cả các daemon của Tài khoản Apple."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "研究用虚拟机很少用到的约 140 个 launch 守护进程,包括 Apple 账户相关的服务。"
+ }
+ }
+ }
+ },
+ "^[%lld system app](inflect: true) removed; Camera and Phone are never removed." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "^[%lld system app](inflect: true) removed; Camera and Phone are never removed."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%lld 個のシステム App を削除します。カメラと電話は削除しません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "시스템 앱 %lld개가 제거되며, 카메라와 전화는 제거되지 않습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Gỡ %lld ứng dụng hệ thống; Camera và Điện thoại không bao giờ bị gỡ."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "移除 %lld 个系统 App;相机和电话不会被移除。"
+ }
+ }
+ }
+ },
+ "No system app is removed." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "No system app is removed."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "システム App は削除しません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "시스템 앱을 제거하지 않습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Không gỡ ứng dụng hệ thống nào."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "不移除系统 App。"
+ }
+ }
+ }
+ },
+ "Each machine can turn services back on and restore apps in Guest System." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Each machine can turn services back on and restore apps in Guest System."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "各マシンは「ゲストシステム」でサービスをオンに戻し、App を復元できます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "각 머신은 게스트 시스템에서 서비스를 다시 켜고 앱을 복원할 수 있습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Mỗi máy ảo có thể bật lại dịch vụ và khôi phục ứng dụng trong Hệ thống máy khách."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "每台虚拟机都可以在“客户机系统”中重新开启服务、恢复 App。"
+ }
+ }
+ }
+ },
+ "Checked apps are removed." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Checked apps are removed."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "チェックした App を削除します。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "선택한 앱이 제거됩니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Các ứng dụng được đánh dấu sẽ bị gỡ."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "勾选的 App 会被移除。"
+ }
+ }
+ }
}
},
"version" : "1.0"
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineAdvancedView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineAdvancedView.swift
index 59685e7d..31ae3f52 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineAdvancedView.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineAdvancedView.swift
@@ -1,8 +1,10 @@
import SwiftUI
-/// New Machine's Advanced page: network, patches and restore options, as
-/// sections of New Machine's form. It edits New Machine's own state.
+/// The patch sections of New Machine's Firmware & Patches page, and the
+/// network and restore options of its Storage & Network page, as sections
+/// of New Machine's form. It edits New Machine's own state.
struct VPhoneLaunchpadNewMachineAdvancedView: View {
+ var page: VPhoneLaunchpadNewMachineView.Page
/// A template never keeps the restore files.
var usesTemplate: Bool
@Binding var network: String
@@ -19,31 +21,45 @@ struct VPhoneLaunchpadNewMachineAdvancedView: View {
@Environment(VPhoneLaunchpadModel.self) private var model
@State private var showsPatchSettings = false
+ /// The network modes `vm create --network` takes, with their titles.
+ static var networkModes: [(tag: String, title: String)] {
+ [
+ ("nat", String(localized: "NAT")),
+ ("bridged", String(localized: "Bridged")),
+ ("tunnel", String(localized: "Tunnel")),
+ ("none", String(localized: "None")),
+ ]
+ }
+
var body: some View {
- Section("Network") {
- Picker("Mode", selection: $network) {
- Text("NAT").tag("nat")
- Text("Bridged").tag("bridged")
- Text("Tunnel").tag("tunnel")
- Text("None").tag("none")
- }
- if network == "tunnel" {
- Text("Traffic leaves through this Mac's own connections, so it follows the Mac's VPN.")
- .foregroundStyle(.secondary)
+ switch page {
+ case .firmware:
+ patchSection
+ case .storage:
+ Section("Network") {
+ Picker("Mode", selection: $network) {
+ ForEach(Self.networkModes, id: \.tag) { mode in
+ Text(verbatim: mode.title).tag(mode.tag)
+ }
+ }
+ if network == "tunnel" {
+ Text("Traffic leaves through this Mac's own connections, so it follows the Mac's VPN.")
+ .foregroundStyle(.secondary)
+ }
}
- }
-
- patchSection
- Section {
- Toggle("Keep prepared restore files", isOn: $keepArtifacts)
- .disabled(usesTemplate)
- } header: {
- Text("Options")
- } footer: {
- if usesTemplate {
- Text("A template never keeps them.").foregroundStyle(.secondary)
+ Section {
+ Toggle("Keep prepared restore files", isOn: $keepArtifacts)
+ .disabled(usesTemplate)
+ } header: {
+ Text("Options")
+ } footer: {
+ if usesTemplate {
+ Text("A template never keeps them.").foregroundStyle(.secondary)
+ }
}
+ default:
+ EmptyView()
}
}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift
index b0aabe84..85f079e0 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift
@@ -1,20 +1,29 @@
import AppKit
import SwiftUI
-/// Name, location, Core Bundle, guest device and firmware pairing from
-/// `fw catalog`, hardware, the template and its slimming, and options, on four
-/// pages. Every page has defaults, so Create works from any of them.
-/// Create hands off to the pipeline sheet.
+/// The name, guest device and firmware pairing from `fw catalog`, and Slim
+/// System on the basic page; hardware, the template and its slimming, the
+/// Core Bundle, custom IPSWs, patches, location and network on four advanced
+/// pages behind one row that sums them up. Every setting has a default, so
+/// Create works from any page. Create hands off to the pipeline sheet.
struct VPhoneLaunchpadNewMachineView: View {
let onCreate: (VPhoneLaunchpadMachinePath) -> Void
@Environment(VPhoneLaunchpadModel.self) private var model
@Environment(\.dismiss) private var dismiss
+ static let defaultCPU = 8
+ static let defaultMemoryMB = 8192
+ static let defaultDiskSizeGB = 64
+ static let defaultNetwork = "nat"
+
@State private var name = ""
/// The Core Bundle picked here; nil follows the default version.
@State private var chosenVersion: String?
/// The canonical library the machine is created in.
@State private var location = VPhoneLaunchpadMachineLocations.defaultRoot
+ /// The location the sheet opened with, which Advanced Options counts
+ /// a change from.
+ @State private var openingLocation: String?
/// A folder chosen with Other… that is not one of the library's locations.
@State private var chosenLocation: String?
@State private var catalog: VPhoneLaunchpadFirmwareCatalog?
@@ -25,10 +34,10 @@ struct VPhoneLaunchpadNewMachineView: View {
@State private var usesCustomSources = false
@State private var iphoneSource = ""
@State private var cloudOSSource = ""
- @State private var cpu = 8
- @State private var memoryMB = 8192
- @State private var diskSizeGB = 64
- @State private var network = "nat"
+ @State private var cpu = Self.defaultCPU
+ @State private var memoryMB = Self.defaultMemoryMB
+ @State private var diskSizeGB = Self.defaultDiskSizeGB
+ @State private var network = Self.defaultNetwork
@State private var patches = VPhoneLaunchpadPatchSelection()
@State private var patchCatalog: VPhoneLaunchpadPatchCatalog?
@State private var patchCatalogError: String?
@@ -36,10 +45,13 @@ struct VPhoneLaunchpadNewMachineView: View {
/// Clone the machine from a template, built first when there is none.
@State private var usesTemplate = true
@State private var slimming = VPhoneLaunchpadSlimming()
- @State private var page = Page.general
+ @State private var page = Page.basic
+ /// The advanced page Advanced Options opens on: the one last shown.
+ @State private var advancedPage = Page.hardware
+ /// The basic page, then the advanced ones.
enum Page: Hashable {
- case general, hardware, template, advanced
+ case basic, hardware, system, firmware, storage
}
private var selectedGuest: VPhoneLaunchpadFirmwareCatalog.Device? {
@@ -110,75 +122,57 @@ struct VPhoneLaunchpadNewMachineView: View {
VPhoneLaunchpadMachineLocations.problem(with: location)
}
- /// Why the template switches stop Create, or nil.
- private var templateProblem: String? {
- guard usesTemplate else {
+ /// Why the location cannot hold the template build, or nil.
+ private var templatePathProblem: String? {
+ // The template is built in a machine named like `template-1a2b3c4d`.
+ guard usesTemplate, !VPhoneLaunchpadMachineLocations.socketPathFits(root: location, name: "template-00000000") else {
return nil
}
- if let problem = slimming.problem {
- return problem
+ return String(localized: "The path is too long. Use a location with a shorter path.")
+ }
+
+ /// A setting on an advanced page that stops Create, and that page. The
+ /// basic page names it under Advanced Options, which opens on it.
+ private var advancedProblem: (page: Page, text: String)? {
+ if let problem = locationProblem ?? templatePathProblem {
+ return (.storage, problem)
}
- // The template is built in a machine named like `template-1a2b3c4d`.
- if !VPhoneLaunchpadMachineLocations.socketPathFits(root: location, name: "template-00000000") {
- return String(localized: "The path is too long. Use a location with a shorter path.")
+ if usesTemplate, let problem = slimming.problem {
+ return (.system, problem)
}
return nil
}
private var canCreate: Bool {
- nameProblem == nil && locationProblem == nil && templateProblem == nil && sources != nil && bundleVersion != nil
+ nameProblem == nil && advancedProblem == nil && sources != nil && bundleVersion != nil
}
var body: some View {
VPhoneLaunchpadSheet(Text("New Machine")) {
VStack(spacing: 0) {
- VPhoneLaunchpadSheetPages(selection: $page) {
- Text("General").tag(Page.general)
- Text("Hardware").tag(Page.hardware)
- Text("Template").tag(Page.template)
- Text("Advanced").tag(Page.advanced)
+ if page != .basic {
+ advancedBar
}
Form {
switch page {
- case .general:
- Section {
- TextField("Name", text: $name)
- locationPicker
- } footer: {
- if let problem = nameProblem ?? locationProblem ?? templateProblem {
- Text(problem).foregroundStyle(.red)
- }
- }
-
- bundleSection
-
- firmware
-
- slimSection
+ case .basic:
+ basicPage
case .hardware:
- Section {
- Stepper("CPU: \(cpu) cores", value: $cpu, in: 1 ... ProcessInfo.processInfo.activeProcessorCount)
- Stepper("Memory: \(memoryMB) MB", value: $memoryMB, in: 2048 ... 65536, step: 1024)
- Stepper("Disk: \(diskSizeGB) GB", value: $diskSizeGB, in: 32 ... 512, step: 16)
- } footer: {
- Text(spaceNote).foregroundStyle(.secondary)
- }
- case .template:
+ hardwarePage
+ case .system:
VPhoneLaunchpadSlimmingSections(usesTemplate: $usesTemplate, slimming: $slimming)
- case .advanced:
- VPhoneLaunchpadNewMachineAdvancedView(
- usesTemplate: usesTemplate,
- network: $network,
- patches: $patches,
- keepArtifacts: $keepArtifacts,
- patchCatalog: patchCatalog,
- patchCatalogError: patchCatalogError,
- reloadPatches: { Task { await loadPatchCatalog() } },
- bundleVersion: bundleVersion,
- )
+ case .firmware:
+ bundleSection
+ firmwareSourceSection
+ advancedSections(.firmware)
+ case .storage:
+ locationSection
+ advancedSections(.storage)
}
}
.formStyle(.grouped)
+ .vphoneFittedHeight(limit: VPhoneLaunchpadSheetHeight.maximum - VPhoneLaunchpadSheetHeight.chrome
+ - (page == .basic ? 0 : VPhoneLaunchpadSheetHeight.pages))
}
} actions: {
Button("Cancel") { dismiss() }
@@ -195,19 +189,110 @@ struct VPhoneLaunchpadNewMachineView: View {
.onAppear {
let root = model.machines.preferredRoot
location = root
+ openingLocation = root
name = suggestedName(in: root)
#if DEBUG
if VPhoneLaunchpadPreview.isActive {
- page = VPhoneLaunchpadPreview.newMachinePage
+ open(VPhoneLaunchpadPreview.newMachinePage)
patches = VPhoneLaunchpadPreview.newMachinePatches
}
#endif
}
}
- // MARK: - Slimming
+ private func open(_ target: Page) {
+ page = target
+ if target != .basic {
+ advancedPage = target
+ }
+ }
+
+ // MARK: - Basic
+
+ @ViewBuilder
+ private var basicPage: some View {
+ Section {
+ TextField("Name", text: $name)
+ firmwareChoice
+ } footer: {
+ if let nameProblem {
+ Text(nameProblem).foregroundStyle(.red)
+ } else {
+ firmwareNote
+ }
+ }
+
+ if model.bundles.selectableVersions.isEmpty {
+ Section {
+ Label("No Core Bundle is installed. Install one in Core Bundle.", systemImage: "exclamationmark.triangle")
+ .foregroundStyle(.secondary)
+ }
+ }
+
+ slimSection
+
+ advancedSection
+ }
+
+ @ViewBuilder
+ private var firmwareChoice: some View {
+ if usesCustomSources {
+ LabeledContent("Firmware") {
+ HStack {
+ Text("Custom IPSWs").foregroundStyle(.secondary)
+ Button("Change…") { open(.firmware) }
+ }
+ }
+ } else if let catalog {
+ if catalog.guests.count > 1 {
+ Picker("Device", selection: Binding(
+ get: { guest },
+ set: { choose($0) },
+ )) {
+ ForEach(catalog.guests) { guest in
+ Text(verbatim: guest.name).tag(Optional(guest.id))
+ }
+ }
+ }
+ Picker(selectedGuest?.isPad == true ? "iPadOS" : "iOS", selection: $pairing) {
+ ForEach((selectedGuest?.pairings ?? []).reversed()) { pairing in
+ Text(verbatim: "\(pairing.ios.name) (\(pairing.build))").tag(Optional(pairing.id))
+ }
+ }
+ } else if let catalogError {
+ Label(catalogError, systemImage: "exclamationmark.triangle")
+ .foregroundStyle(.secondary)
+ } else {
+ HStack {
+ ProgressView().controlSize(.small)
+ Text("Loading firmware catalog…").foregroundStyle(.secondary)
+ }
+ }
+ }
+
+ @ViewBuilder
+ private var firmwareNote: some View {
+ if usesCustomSources {
+ if let (iphone, cloudOS) = sources {
+ Text(verbatim: "\(Self.fileName(iphone)) · \(Self.fileName(cloudOS))")
+ .foregroundStyle(.secondary)
+ .lineLimit(1)
+ .truncationMode(.middle)
+ } else {
+ Text("Choose an iPhone IPSW and a cloudOS IPSW in Advanced Options.").foregroundStyle(.red)
+ }
+ } else if let selectedGuest, let cloudOS = selectedPairing?.recommendedCloudOS.name {
+ Text("Recommended firmware pairings for \(selectedGuest.detailedName), with \(cloudOS).")
+ .foregroundStyle(.secondary)
+ }
+ }
+
+ private static func fileName(_ source: String) -> String {
+ let url = source.hasPrefix("/") ? URL(fileURLWithPath: source) : URL(string: source)
+ return url?.lastPathComponent ?? source
+ }
- /// The master switch. The parts are on the Template page.
+ /// The master switch. The parts are on the System page.
private var slimSection: some View {
Section {
Toggle("Slim System", isOn: $slimming.slim)
@@ -215,9 +300,9 @@ struct VPhoneLaunchpadNewMachineView: View {
} footer: {
Group {
if !usesTemplate {
- Text("Without a template the machine is not slimmed. Turn templates on in Template.")
+ Text("Without a template the machine is not slimmed. Turn templates on in Advanced Options.")
} else if slimming.slim {
- Text("Trims system files, unneeded services and system apps once, in the template the machine is cloned from. Choose what goes in Template.")
+ Text("Cloned from a shared template that trims system files, unneeded services and system apps once. Setup Assistant is skipped.")
} else {
Text("The template keeps every file, service and app. Setup Assistant is still skipped.")
}
@@ -226,6 +311,118 @@ struct VPhoneLaunchpadNewMachineView: View {
}
}
+ /// One row that opens the advanced pages: what they are set to, how many
+ /// settings differ from the defaults, and anything that stops Create.
+ private var advancedSection: some View {
+ Section {
+ Button {
+ open(advancedProblem?.page ?? advancedPage)
+ } label: {
+ LabeledContent {
+ HStack(spacing: 6) {
+ Text(verbatim: advancedSummary)
+ .lineLimit(1)
+ Image(systemName: "chevron.right")
+ .font(.caption.weight(.semibold))
+ }
+ .foregroundStyle(.secondary)
+ } label: {
+ HStack(spacing: 6) {
+ Text("Advanced Options")
+ if changedCount > 0 {
+ Text("^[\(changedCount) setting](inflect: true) changed")
+ .font(.caption)
+ .padding(.horizontal, 6)
+ .padding(.vertical, 1)
+ .background(Capsule().fill(.tint.opacity(0.15)))
+ .foregroundStyle(.tint)
+ }
+ }
+ }
+ .contentShape(Rectangle())
+ }
+ .buttonStyle(.plain)
+ } footer: {
+ if let advancedProblem {
+ Text(advancedProblem.text).foregroundStyle(.red)
+ } else {
+ Text(spaceNote).foregroundStyle(.secondary)
+ }
+ }
+ }
+
+ private var advancedSummary: String {
+ let network = VPhoneLaunchpadNewMachineAdvancedView.networkModes.first { $0.tag == network }?.title ?? network
+ return String(localized: "\(cpu) cores · \(memoryMB / 1024) GB memory · \(diskSizeGB) GB disk") + " · " + network
+ }
+
+ /// The advanced settings that differ from what the sheet opened with.
+ private var changedCount: Int {
+ var defaultSlimming = VPhoneLaunchpadSlimming()
+ // Slim System is on the basic page.
+ defaultSlimming.slim = slimming.slim
+ return [
+ cpu != Self.defaultCPU,
+ memoryMB != Self.defaultMemoryMB,
+ diskSizeGB != Self.defaultDiskSizeGB,
+ !usesTemplate,
+ usesTemplate && slimming != defaultSlimming,
+ chosenVersion != nil && bundleVersion != model.bundles.defaultVersion,
+ usesCustomSources,
+ patches != VPhoneLaunchpadPatchSelection(),
+ openingLocation != nil && location != openingLocation,
+ network != Self.defaultNetwork,
+ !usesTemplate && keepArtifacts,
+ ].count(where: \.self)
+ }
+
+ // MARK: - Advanced
+
+ /// Back to the basic page, and the advanced pages.
+ private var advancedBar: some View {
+ HStack(spacing: 12) {
+ Button {
+ open(.basic)
+ } label: {
+ Label("Basic Settings", systemImage: "chevron.left")
+ }
+ .buttonStyle(.borderless)
+ .padding(.top, 16)
+ VPhoneLaunchpadSheetPages(selection: Binding(get: { page }, set: { open($0) })) {
+ Text("Hardware").tag(Page.hardware)
+ Text("System").tag(Page.system)
+ Text("Firmware & Patches").tag(Page.firmware)
+ Text("Storage & Network").tag(Page.storage)
+ }
+ .frame(maxWidth: .infinity)
+ }
+ .padding(.horizontal, 20)
+ }
+
+ private var hardwarePage: some View {
+ Section {
+ Stepper("CPU: \(cpu) cores", value: $cpu, in: 1 ... ProcessInfo.processInfo.activeProcessorCount)
+ Stepper("Memory: \(memoryMB) MB", value: $memoryMB, in: 2048 ... 65536, step: 1024)
+ Stepper("Disk: \(diskSizeGB) GB", value: $diskSizeGB, in: 32 ... 512, step: 16)
+ } footer: {
+ Text(spaceNote).foregroundStyle(.secondary)
+ }
+ }
+
+ private func advancedSections(_ page: Page) -> some View {
+ VPhoneLaunchpadNewMachineAdvancedView(
+ page: page,
+ usesTemplate: usesTemplate,
+ network: $network,
+ patches: $patches,
+ keepArtifacts: $keepArtifacts,
+ patchCatalog: patchCatalog,
+ patchCatalogError: patchCatalogError,
+ reloadPatches: { Task { await loadPatchCatalog() } },
+ bundleVersion: bundleVersion,
+ )
+ }
+
// MARK: - Core Bundle
private var bundleSection: some View {
@@ -272,6 +469,19 @@ struct VPhoneLaunchpadNewMachineView: View {
// MARK: - Location
+ private var locationSection: some View {
+ Section {
+ locationPicker
+ } footer: {
+ if let problem = locationProblem ?? templatePathProblem {
+ Text(problem).foregroundStyle(.red)
+ } else {
+ Text("The machine is created in a folder named after it inside this location.")
+ .foregroundStyle(.secondary)
+ }
+ }
+ }
+
/// The library's locations that are mounted, the default one first, and
/// a folder chosen with Other….
private var locations: [String] {
@@ -335,7 +545,7 @@ struct VPhoneLaunchpadNewMachineView: View {
// MARK: - Firmware
- private var firmware: some View {
+ private var firmwareSourceSection: some View {
Section {
Picker("Source", selection: $usesCustomSources) {
Text("Catalog").tag(false)
@@ -346,39 +556,16 @@ struct VPhoneLaunchpadNewMachineView: View {
if usesCustomSources {
sourceField("iPhone IPSW", $iphoneSource)
sourceField("cloudOS IPSW", $cloudOSSource)
- } else if let catalog {
- if catalog.guests.count > 1 {
- Picker("Device", selection: Binding(
- get: { guest },
- set: { choose($0) },
- )) {
- ForEach(catalog.guests) { guest in
- Text(verbatim: guest.name).tag(Optional(guest.id))
- }
- }
- }
- Picker(selectedGuest?.isPad == true ? "iPadOS" : "iOS", selection: $pairing) {
- ForEach((selectedGuest?.pairings ?? []).reversed()) { pairing in
- Text(verbatim: "\(pairing.ios.name) (\(pairing.build))").tag(Optional(pairing.id))
- }
- }
- LabeledContent("cloudOS", value: selectedPairing?.recommendedCloudOS.name ?? "—")
- } else if let catalogError {
- Label(catalogError, systemImage: "exclamationmark.triangle")
- .foregroundStyle(.secondary)
} else {
- HStack {
- ProgressView().controlSize(.small)
- Text("Loading firmware catalog…").foregroundStyle(.secondary)
- }
+ LabeledContent("cloudOS", value: selectedPairing?.recommendedCloudOS.name ?? "—")
}
} header: {
Text("Firmware")
} footer: {
- if !usesCustomSources, let selectedGuest {
- Text("Recommended firmware pairings for \(selectedGuest.detailedName).")
- .foregroundStyle(.secondary)
- }
+ Text(usesCustomSources
+ ? "These two files replace the device and version chosen on the basic page."
+ : "The device and version are chosen on the basic page; cloudOS goes with them.")
+ .foregroundStyle(.secondary)
}
}
@@ -603,6 +790,9 @@ struct VPhoneLaunchpadCreationView: View {
}
}
.formStyle(.grouped)
+ // A template build lists fourteen steps: the form scrolls in a
+ // sheet that fits a laptop screen instead of growing past it.
+ .vphoneFittedHeight(limit: VPhoneLaunchpadSheetHeight.maximum - VPhoneLaunchpadSheetHeight.chrome)
.task(id: creation.isFinished && creation.builtTemplate) {
guard creation.isFinished, creation.builtTemplate, !offersIPSWs else {
return
@@ -625,10 +815,7 @@ struct VPhoneLaunchpadCreationView: View {
.keyboardShortcut(.cancelAction)
}
.frame(width: 720)
- // A template build lists fourteen steps: the form scrolls in a
- // sheet that fits a laptop screen instead of growing past it.
- .frame(height: creation.plan.usesTemplate ? 720 : nil)
- .fixedSize(horizontal: false, vertical: !creation.plan.usesTemplate)
+ .fixedSize(horizontal: false, vertical: true)
.sheet(isPresented: $showsLog) {
VPhoneLaunchpadConsoleView(title: "\(creation.options.name) Creation Log", url: creation.logFile)
}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSlimmingView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSlimmingView.swift
index 0743c05b..9e7ace86 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSlimmingView.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSlimmingView.swift
@@ -1,11 +1,13 @@
import SwiftUI
-/// New Machine's Template page: whether the machine is cloned from a
+/// New Machine's System page: whether the machine is cloned from a
/// template, and how that template is slimmed. The switches are part of the
/// template's key: other switches make another template, and both stay.
+/// Slim System itself is on the basic page.
struct VPhoneLaunchpadSlimmingSections: View {
@Binding var usesTemplate: Bool
@Binding var slimming: VPhoneLaunchpadSlimming
+ @State private var choosesApps = false
var body: some View {
Section {
@@ -13,16 +15,20 @@ struct VPhoneLaunchpadSlimmingSections: View {
} header: {
Text("Template")
} footer: {
- Text(usesTemplate
- ? "Machines from one template share its SEP root secret and Data volume keys. Turn this off for a machine that needs keys of its own."
- : "The machine is restored on its own, with keys of its own. It is not slimmed, and starts at Setup Assistant.")
- .foregroundStyle(.secondary)
+ VStack(alignment: .leading, spacing: 4) {
+ Text(usesTemplate
+ ? "Machines from one template share its SEP root secret and Data volume keys. Turn this off for a machine that needs keys of its own."
+ : "The machine is restored on its own, with keys of its own. It is not slimmed, and starts at Setup Assistant.")
+ if usesTemplate, !slimming.slim {
+ Text("Slim System is off, so the template keeps every file, service and app.")
+ }
+ }
+ .foregroundStyle(.secondary)
}
if usesTemplate {
filesSection
servicesSection
- appsSection
}
}
@@ -62,44 +68,61 @@ struct VPhoneLaunchpadSlimmingSections: View {
}
}
- // MARK: - Services
+ // MARK: - Services and apps
+ /// Apple Account is not offered: the guest refuses its sign-in either
+ /// way, so the trimmed profile always turns its daemons off.
private var servicesSection: some View {
Section {
Toggle("Turn off unneeded services", isOn: $slimming.trimsServices)
- Toggle("Turn off Apple Account", isOn: $slimming.accountsOff)
- .disabled(!slimming.trimsServices)
+ LabeledContent("Remove system apps") {
+ HStack {
+ Button("Choose…") { choosesApps = true }
+ .disabled(!slimming.removesApps)
+ .popover(isPresented: $choosesApps, arrowEdge: .trailing) {
+ appsPopover
+ }
+ Toggle("Remove system apps", isOn: $slimming.removesApps)
+ .toggleStyle(.switch)
+ .labelsHidden()
+ }
+ }
} header: {
- Text("Services")
+ Text("Services and Apps")
} footer: {
- Text("About 140 launch daemons a research machine rarely needs. Each machine can switch them back on in Guest System. Without Apple Account the guest cannot sign in.")
- .foregroundStyle(.secondary)
+ VStack(alignment: .leading, spacing: 4) {
+ Text("About 140 launch daemons a research machine rarely needs, Apple Account's among them.")
+ if slimming.removesApps {
+ Text("^[\(slimming.removedApps.count) system app](inflect: true) removed; Camera and Phone are never removed.")
+ } else {
+ Text("No system app is removed.")
+ }
+ Text("Each machine can turn services back on and restore apps in Guest System.")
+ }
+ .foregroundStyle(.secondary)
}
.disabled(!slimming.slim)
}
- // MARK: - Apps
-
- private var appsSection: some View {
- Section {
- Toggle("Remove system apps", isOn: $slimming.removesApps)
- if slimming.removesApps {
- LazyVGrid(columns: [GridItem(.flexible(), alignment: .leading), GridItem(.flexible(), alignment: .leading)], spacing: 6) {
- ForEach(VPhoneLaunchpadSlimming.removableApps) { app in
- Toggle(isOn: removes(app.id)) {
- Text(verbatim: app.name)
+ private var appsPopover: some View {
+ VStack(alignment: .leading, spacing: 8) {
+ Text("Checked apps are removed.")
+ .foregroundStyle(.secondary)
+ Grid(alignment: .leading, horizontalSpacing: 16, verticalSpacing: 6) {
+ let apps = VPhoneLaunchpadSlimming.removableApps
+ ForEach(Array(stride(from: 0, to: apps.count, by: 2)), id: \.self) { index in
+ GridRow {
+ ForEach(apps[index ..< min(index + 2, apps.count)]) { app in
+ Toggle(isOn: removes(app.id)) {
+ Text(verbatim: app.name)
+ }
+ .toggleStyle(.checkbox)
}
- .toggleStyle(.checkbox)
}
}
}
- } header: {
- Text("System Apps")
- } footer: {
- Text("Checked apps are removed. Camera and Phone are never removed. Each machine can restore removed apps in Guest System.")
- .foregroundStyle(.secondary)
}
- .disabled(!slimming.slim)
+ .padding(14)
}
private func removes(_ bundleID: String) -> Binding<Bool> {
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplates.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplates.swift
index 8642741c..1c70e810 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplates.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplates.swift
@@ -47,8 +47,10 @@ nonisolated struct VPhoneLaunchpadSlimming: Hashable, Sendable {
var removesApps = true
/// Apps of ``removableApps`` to keep.
var keptApps: Set<String> = []
- /// Also turns off the Apple Account daemons. Needs the trimmed profile.
- var accountsOff = false
+ /// Also turns off the Apple Account daemons, which counts only with the
+ /// trimmed profile. On by default and not offered in New Machine: the
+ /// guest refuses Apple Account sign-in and its services either way.
+ var accountsOff = true
static let defaultLanguages = "en,zh-Hans,zh"