Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Move Launchpad setup into sheets and install bundles from GitHub Actions

Lakrdae93457df22
diff --git a/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved b/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 403549ec..50f3904e 100644
--- a/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/VPhone.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -51,8 +51,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Lakr233/libghostty-spm.git",
"state" : {
- "revision" : "b7f888e3baf8585ea9d590ab1a45b49475e00d1c",
- "version" : "1.6.20260922"
+ "revision" : "5a025555f0a85ee51da7eb306c35f660d116e879",
+ "version" : "1.6.20260928"
}
},
{
diff --git a/VPhoneLaunchpad/Configuration/Version.xcconfig b/VPhoneLaunchpad/Configuration/Version.xcconfig
index 19a1e83f..a0a73ad2 100644
--- a/VPhoneLaunchpad/Configuration/Version.xcconfig
+++ b/VPhoneLaunchpad/Configuration/Version.xcconfig
@@ -1,4 +1,4 @@
MARKETING_VERSION = 2.0.8
// Bump whenever the helper changes. The app blesses the helper again when the
// installed helper's version or bytes differ from the copy it embeds.
-CURRENT_PROJECT_VERSION = 6
+CURRENT_PROJECT_VERSION = 7
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.pbxproj b/VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.pbxproj
index 026bba60..817674c5 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.pbxproj
+++ b/VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.pbxproj
@@ -109,7 +109,7 @@
5A1000000000000000000093 /* Build configuration list for PBXNativeTarget "VPhoneLaunchpadHelper" */ = {isa = XCConfigurationList; buildConfigurations = (5A1000000000000000000085 /* Debug */, 5A1000000000000000000086 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
- 5A10000000000000000000A1 /* XCRemoteSwiftPackageReference "libghostty-spm" */ = {isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/Lakr233/libghostty-spm.git"; requirement = {kind = upToNextMajorVersion; minimumVersion = 1.6.20260922; }; };
+ 5A10000000000000000000A1 /* XCRemoteSwiftPackageReference "libghostty-spm" */ = {isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/Lakr233/libghostty-spm.git"; requirement = {kind = upToNextMajorVersion; minimumVersion = 1.6.20260928; }; };
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
5A10000000000000000000B1 /* GhosttyTerminal */ = {isa = XCSwiftPackageProductDependency; package = 5A10000000000000000000A1 /* XCRemoteSwiftPackageReference "libghostty-spm" */; productName = GhosttyTerminal; };
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 34075008..1d6e5e17 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -6,8 +6,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Lakr233/libghostty-spm.git",
"state" : {
- "revision" : "b7f888e3baf8585ea9d590ab1a45b49475e00d1c",
- "version" : "1.6.20260922"
+ "revision" : "5a025555f0a85ee51da7eb306c35f660d116e879",
+ "version" : "1.6.20260928"
}
},
{
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadApp.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadApp.swift
index 47182a50..f0ec8582 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadApp.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadApp.swift
@@ -10,12 +10,15 @@ struct VPhoneLaunchpadApp: App {
Window(Text(verbatim: "vphone-launchpad"), id: "main") {
VPhoneLaunchpadRootView()
.environment(model)
- .frame(minWidth: 820, minHeight: 560)
.onAppear { delegate.model = model }
}
.windowToolbarStyle(.unified(showsTitle: false))
.commands {
CommandGroup(replacing: .newItem) {}
+ CommandGroup(after: .appSettings) {
+ Button("Host Setup…") { model.panel = .hostSetup }
+ Button("Core Bundle…") { model.panel = .coreBundle }
+ }
}
}
}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadModel.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadModel.swift
index 7ad7a2a3..21f0d7c0 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadModel.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadModel.swift
@@ -1,19 +1,16 @@
import Foundation
import Observation
-/// Owns the three stages and decides which of them the segmented control
-/// shows. Host Setup is always there; Core Bundle appears once the required
-/// host checks pass; Machines appears once the active bundle passes host
-/// preflight. After setup has completed once, all three stay visible and a
-/// regression only marks Host Setup, so machines are never hidden by, say,
-/// a helper that needs updating.
+/// Owns the host checks, the installed bundles and the machine library. The
+/// window always shows the machines; Host Setup and Core Bundle are sheets
+/// over it. On launch the first stage that is not ready opens by itself, and
+/// a toolbar button marks a stage that regresses later.
@MainActor
@Observable
final class VPhoneLaunchpadModel {
- enum Section: String, CaseIterable, Identifiable {
+ enum Panel: String, Identifiable {
case hostSetup
case coreBundle
- case machines
var id: Self {
self
@@ -23,7 +20,6 @@ final class VPhoneLaunchpadModel {
switch self {
case .hostSetup: String(localized: "Host Setup")
case .coreBundle: String(localized: "Core Bundle")
- case .machines: String(localized: "Machines")
}
}
}
@@ -35,12 +31,9 @@ final class VPhoneLaunchpadModel {
let bundles: VPhoneLaunchpadCoreBundle
let machines: VPhoneLaunchpadMachineLibrary
- var selection: Section = .hostSetup
+ var panel: Panel?
private(set) var isStarted = false
- private static let setupCompletedKey = "VPhoneLaunchpadSetupCompleted"
- private static let showAllSectionsKey = "VPhoneLaunchpadShowAllSections"
-
init() {
libraryRoot = URL(fileURLWithPath: VPhoneLaunchpadMachineLocations.defaultRoot, isDirectory: true)
host = VPhoneLaunchpadHostSetup(helper: helper, libraryRoot: libraryRoot)
@@ -48,58 +41,14 @@ final class VPhoneLaunchpadModel {
machines = VPhoneLaunchpadMachineLibrary(bundles: bundles, helper: helper)
}
- // MARK: - Sections
-
- #if DEBUG
- /// Snapshot mode keeps setup state in memory, off the real defaults.
- var previewSetupCompleted: Bool?
- #endif
-
- private var setupCompleted: Bool {
- get {
- access(keyPath: \.setupCompleted)
- #if DEBUG
- if let previewSetupCompleted {
- return previewSetupCompleted
- }
- #endif
- return UserDefaults.standard.bool(forKey: Self.setupCompletedKey)
- }
- set {
- withMutation(keyPath: \.setupCompleted) {
- UserDefaults.standard.set(newValue, forKey: Self.setupCompletedKey)
- }
- }
- }
+ // MARK: - Attention
- var sections: [Section] {
- #if DEBUG
- if UserDefaults.standard.bool(forKey: Self.showAllSectionsKey) {
- return Section.allCases
- }
- #endif
- if setupCompleted {
- return Section.allCases
- }
- var sections: [Section] = [.hostSetup]
- if host.requiredPassed {
- sections.append(.coreBundle)
- if bundles.isReady {
- sections.append(.machines)
- }
- }
- return sections
+ var hostNeedsAttention: Bool {
+ !host.isChecking && !host.requiredPassed
}
- func title(for section: Section) -> String {
- switch section {
- case .hostSetup where setupCompleted && !host.isChecking && !host.requiredPassed:
- "\(section.title) ▲"
- case .coreBundle where setupCompleted && !bundles.isReady && !bundles.installed.isEmpty:
- "\(section.title) ▲"
- default:
- section.title
- }
+ var bundleNeedsAttention: Bool {
+ host.requiredPassed && !bundles.isReady && !bundles.isInstalling && bundles.progress?.canSkip != true
}
/// Installing a bundle needs the helper (root-owned store) and Developer
@@ -132,46 +81,58 @@ final class VPhoneLaunchpadModel {
await bundles.refresh()
await machines.refresh()
machines.startMonitoring()
- advance(selectNewest: true)
+ // An unfinished install is picked up in the inspector instead.
+ if panel == nil, bundles.progress == nil || bundles.progress?.isFinished == true {
+ panel = !host.requiredPassed ? .hostSetup : !bundles.isReady ? .coreBundle : nil
+ }
}
func refreshHost() async {
await host.refresh()
- advance(selectNewest: true)
}
+ // MARK: - Bundle install
+
+ /// An install runs in the inspector, not in the sheet it started from,
+ /// so the sheet closes and the inspector opens on its progress.
func installBundle(_ release: VPhoneLaunchpadRelease) async {
+ revealInstall()
await bundles.install(release)
await machines.refresh()
- advance(selectNewest: false)
+ }
+
+ func installArtifact(_ artifact: VPhoneLaunchpadArtifact) async {
+ revealInstall()
+ await bundles.installArtifact(artifact)
+ await machines.refresh()
}
func installLocalBundle(_ source: URL) async {
+ revealInstall()
await bundles.installLocal(source)
await machines.refresh()
- advance(selectNewest: false)
}
+ func retryInstall() async {
+ await bundles.retry()
+ await machines.refresh()
+ }
+
+ private func revealInstall() {
+ panel = nil
+ showsInspector = true
+ isInstallExpanded = true
+ }
+
+ // MARK: - Inspector
+
+ var showsInspector = true
+ var isInstallExpanded = true
+
func removeBundle(_ version: String) async {
await bundles.remove(version)
if let active = bundles.activeVersion, bundles.active?.preflight == .pending {
await bundles.verify(active)
}
- advance(selectNewest: false)
- }
-
- /// Records completed setup and moves the selection to a newly revealed
- /// section, or back to one that still exists.
- private func advance(selectNewest: Bool) {
- let before = sections
- if host.requiredPassed, bundles.isReady {
- setupCompleted = true
- }
- let after = sections
- if selectNewest {
- selection = !host.requiredPassed ? .hostSetup : bundles.isReady ? .machines : .coreBundle
- } else if after.count > before.count || !after.contains(selection) {
- selection = after.last ?? .hostSetup
- }
}
}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift
index ac820b89..2c2ac3d0 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift
@@ -15,6 +15,8 @@
}
static let sheetNotification = Notification.Name("VPhoneLaunchpadPreviewSheet")
+ /// The source a Core Bundle sheet opens on.
+ static var coreBundleSource = VPhoneLaunchpadCoreBundleView.Source.releases
// MARK: - Driver
@@ -46,30 +48,29 @@
for (suffix, appearance) in [("light", NSAppearance.Name.aqua), ("dark", .darkAqua)] {
NSApp.appearance = NSAppearance(named: appearance)
- model.previewSetupCompleted = false
model.helper.applyPreview(.notInstalled)
model.host.applyPreview(blocked: true)
model.bundles.applyPreview(installing: false)
- model.selection = .hostSetup
- await shot("01-host-setup-first-run", suffix)
+ await panel(model, .hostSetup, "01-host-setup-first-run", suffix)
model.helper.applyPreview(.ready("1"))
model.host.applyPreview(blocked: false)
model.bundles.applyPreview(installing: true)
- model.selection = .coreBundle
- await shot("02-core-bundle-first-install", suffix)
+ await panel(model, .coreBundle, "02-core-bundle-first-install", suffix)
model.bundles.applyPreview(installing: false)
- model.previewSetupCompleted = true
- model.selection = .coreBundle
- await shot("03-core-bundle", suffix)
+ await panel(model, .coreBundle, "03-core-bundle", suffix)
+ coreBundleSource = .actions
+ await panel(model, .coreBundle, "03b-core-bundle-actions", suffix)
+ coreBundleSource = .releases
- model.selection = .hostSetup
- await shot("04-host-setup-passed", suffix)
+ await panel(model, .hostSetup, "04-host-setup-passed", suffix)
model.machines.selection = path("research-01")
- model.selection = .machines
await shot("05-machines", suffix)
+ model.showsInspector = false
+ await shot("05a-machines-no-inspector", suffix)
+ model.showsInspector = true
if let machine = model.machines.selected {
await standalone("05b-machine-inspector", suffix, size: NSSize(width: 380, height: 980)) {
VPhoneLaunchpadMachineInspector(machine: machine, onShowProgress: { _ in }, onOpenConsole: { _ in })
@@ -103,6 +104,18 @@
NSApp.windows.first { $0.isVisible && $0.sheetParent == nil && $0.frame.width > 400 }
}
+ private static func panel(
+ _ model: VPhoneLaunchpadModel,
+ _ panel: VPhoneLaunchpadModel.Panel,
+ _ name: String,
+ _ suffix: String,
+ ) async {
+ model.panel = panel
+ await shot(name, suffix)
+ model.panel = nil
+ try? await Task.sleep(for: .milliseconds(800))
+ }
+
private static func sheet(_ sheet: VPhoneLaunchpadMachinesView.Sheet, _ name: String, _ suffix: String) async {
NotificationCenter.default.post(name: sheetNotification, object: sheet)
await shot(name, suffix)
@@ -175,6 +188,27 @@
)
}
+ static let artifacts: [VPhoneLaunchpadArtifact] = [
+ artifact(1, "cd013c2a5e8f41b7d09c3e6a2f14b85d7c90e3a1", "2026-09-28T02:14:00Z"),
+ artifact(2, "374a2c5f0b1e9d8c7a6b5d4e3f2a1b0c9d8e7f6a", "2026-09-27T16:40:00Z"),
+ ]
+
+ private static func artifact(_ id: Int64, _ commit: String, _ date: String) -> VPhoneLaunchpadArtifact {
+ let created = ISO8601DateFormatter().date(from: date) ?? Date()
+ return VPhoneLaunchpadArtifact(
+ id: id,
+ name: "vphone-release-\(commit)",
+ commit: commit,
+ branch: "main",
+ runID: id,
+ createdAt: created,
+ expiresAt: created.addingTimeInterval(7 * 86400),
+ size: 20_564_139,
+ sha256: String(repeating: "0", count: 64),
+ downloadURL: URL(string: "https://example.invalid/\(id).zip")!,
+ )
+ }
+
static let machines: [VPhoneLaunchpadMachine] = {
let json = """
[
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadRootView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadRootView.swift
index 7ebe92a9..098abcbf 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadRootView.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadRootView.swift
@@ -5,61 +5,72 @@ struct VPhoneLaunchpadRootView: View {
var body: some View {
@Bindable var model = model
- Group {
- switch model.selection {
- case .hostSetup:
- VPhoneLaunchpadHostSetupView()
- case .coreBundle:
- VPhoneLaunchpadCoreBundleView()
- case .machines:
- VPhoneLaunchpadMachinesView()
+ @Bindable var host = model.host
+ @Bindable var bundles = model.bundles
+ VPhoneLaunchpadMachinesView()
+ .frame(maxWidth: .infinity, maxHeight: .infinity)
+ .toolbar {
+ ToolbarItemGroup(placement: .navigation) {
+ panelButton(.hostSetup, systemImage: "checklist", needsAttention: model.hostNeedsAttention)
+ panelButton(.coreBundle, systemImage: "shippingbox", needsAttention: model.bundleNeedsAttention)
+ }
}
- }
- .frame(maxWidth: .infinity, maxHeight: .infinity)
- .toolbar {
- ToolbarItem(placement: .principal) {
- Picker("Section", selection: $model.selection) {
- ForEach(model.sections) { section in
- Text(model.title(for: section)).tag(section)
+ .navigationTitle("Machines")
+ .task { await model.start() }
+ .sheet(item: $model.panel) { panel in
+ Group {
+ switch panel {
+ case .hostSetup:
+ VPhoneLaunchpadHostSetupView()
+ case .coreBundle:
+ VPhoneLaunchpadCoreBundleView()
}
}
- .pickerStyle(.segmented)
- .labelsHidden()
- .fixedSize()
+ .environment(model)
+ }
+ // A sheet shows its own errors; these cover work done with none
+ // open, such as the helper update on launch.
+ .errorAlert($host.actionError, isEnabled: model.panel == nil)
+ .errorAlert($bundles.actionError, isEnabled: model.panel == nil)
+ }
+
+ private func panelButton(_ panel: VPhoneLaunchpadModel.Panel, systemImage: String, needsAttention: Bool) -> some View {
+ Button {
+ model.panel = panel
+ } label: {
+ Label {
+ Text(panel.title)
+ } icon: {
+ if needsAttention {
+ Image(systemName: "exclamationmark.triangle.fill")
+ .foregroundStyle(.yellow)
+ } else {
+ Image(systemName: systemImage)
+ }
}
}
- .navigationTitle(model.selection.title)
- .task { await model.start() }
- .alert(
- model.host.actionError?.message ?? "",
- isPresented: errorBinding(\.host.actionError),
- presenting: model.host.actionError,
- ) { _ in
- Button("OK") {}
- } message: { error in
- Text(error.detail ?? "")
- }
- .alert(
- model.bundles.actionError?.message ?? "",
- isPresented: errorBinding(\.bundles.actionError),
- presenting: model.bundles.actionError,
+ .help(needsAttention ? "\(panel.title) needs attention" : panel.title)
+ }
+}
+
+extension View {
+ /// Presents an action error as an alert and clears it when dismissed.
+ func errorAlert(_ error: Binding<VPhoneLaunchpadError?>, isEnabled: Bool = true) -> some View {
+ alert(
+ error.wrappedValue?.message ?? "",
+ isPresented: Binding(
+ get: { isEnabled && error.wrappedValue != nil },
+ set: {
+ if !$0 {
+ error.wrappedValue = nil
+ }
+ },
+ ),
+ presenting: error.wrappedValue,
) { _ in
Button("OK") {}
} message: { error in
Text(error.detail ?? "")
}
}
-
- private func errorBinding(
- _ keyPath: ReferenceWritableKeyPath<VPhoneLaunchpadModel, VPhoneLaunchpadError?>,
- ) -> Binding<Bool> {
- Binding(
- get: { model[keyPath: keyPath] != nil },
- set: {
- if !$0 {
- model[keyPath: keyPath] = nil
- }
- },
- )
- }
}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadStatus.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadStatus.swift
index 31ba1d47..76254451 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadStatus.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadStatus.swift
@@ -2,7 +2,7 @@ import SwiftUI
// MARK: - Status
-nonisolated enum VPhoneLaunchpadStatus: Equatable, Sendable {
+nonisolated enum VPhoneLaunchpadStatus: String, Codable, Sendable {
case passed
case warning
case failed
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadArtifact.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadArtifact.swift
new file mode 100644
index 00000000..13091bc5
--- /dev/null
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadArtifact.swift
@@ -0,0 +1,189 @@
+import Foundation
+import Security
+
+/// A `vphone-release-<commit>` artifact from the package workflow. It holds
+/// `VPhone-<commit>.zip` next to the Launchpad zip. GitHub records a SHA-256
+/// digest for the artifact, which the download is checked against; the
+/// bundle zip inside it then goes through the helper like a local build.
+///
+/// Listing works without a token. Downloading an artifact does not, even from
+/// a public repository, so the user supplies one with Actions read access.
+nonisolated struct VPhoneLaunchpadArtifact: Identifiable, Hashable, Codable, Sendable {
+ let id: Int64
+ let name: String
+ let commit: String
+ let branch: String
+ let runID: Int64
+ let createdAt: Date
+ let expiresAt: Date
+ let size: Int64
+ let sha256: String
+ let downloadURL: URL
+
+ static let namePrefix = "vphone-release-"
+ static let endpoint = URL(string: "https://api.github.com/repos/Lakr233/vphone-cli/actions/artifacts?per_page=50")!
+
+ var shortCommit: String {
+ String(commit.prefix(7))
+ }
+
+ /// The store name suffix, after the bundle's own version.
+ var versionSuffix: String {
+ "-ci.\(shortCommit)"
+ }
+
+ var runURL: URL {
+ URL(string: "https://github.com/Lakr233/vphone-cli/actions/runs/\(runID)")!
+ }
+
+ // MARK: - Listing
+
+ static func fetch(token: String?) async throws -> [VPhoneLaunchpadArtifact] {
+ let (data, response) = try await URLSession.shared.data(for: request(endpoint, token: token))
+ guard let http = response as? HTTPURLResponse, http.statusCode == 200 else {
+ throw VPhoneLaunchpadError(String(localized: "Unable to load GitHub Actions builds. Try again later."))
+ }
+ let decoder = JSONDecoder()
+ decoder.dateDecodingStrategy = .iso8601
+ let payload = try decoder.decode(Payload.self, from: data)
+ return payload.artifacts.compactMap { artifact in
+ guard artifact.name.hasPrefix(namePrefix), !artifact.expired,
+ let digest = artifact.digest, digest.hasPrefix("sha256:"),
+ let run = artifact.workflow_run,
+ run.head_sha.range(of: "^[0-9a-f]{40}$", options: .regularExpression) != nil
+ else {
+ return nil
+ }
+ return VPhoneLaunchpadArtifact(
+ id: artifact.id,
+ name: artifact.name,
+ commit: run.head_sha,
+ branch: run.head_branch ?? "",
+ runID: run.id,
+ createdAt: artifact.created_at,
+ expiresAt: artifact.expires_at,
+ size: artifact.size_in_bytes,
+ sha256: String(digest.dropFirst("sha256:".count)),
+ downloadURL: artifact.archive_download_url,
+ )
+ }
+ .sorted { $0.createdAt > $1.createdAt }
+ }
+
+ private struct Payload: Decodable {
+ struct Artifact: Decodable {
+ struct Run: Decodable {
+ let id: Int64
+ let head_branch: String?
+ let head_sha: String
+ }
+
+ let id: Int64
+ let name: String
+ let size_in_bytes: Int64
+ let archive_download_url: URL
+ let expired: Bool
+ let digest: String?
+ let created_at: Date
+ let expires_at: Date
+ let workflow_run: Run?
+ }
+
+ let artifacts: [Artifact]
+ }
+
+ private static func request(_ url: URL, token: String?) -> URLRequest {
+ var request = URLRequest(url: url)
+ request.setValue("application/vnd.github+json", forHTTPHeaderField: "Accept")
+ request.setValue("vphone-launchpad", forHTTPHeaderField: "User-Agent")
+ if let token, !token.isEmpty {
+ request.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
+ }
+ return request
+ }
+
+ // MARK: - Download
+
+ /// Downloads the artifact zip. Returns the file and its hex SHA-256.
+ @concurrent func download(token: String, progress: @escaping @Sendable (Int64) -> Void) async throws -> (URL, String) {
+ let name = name
+ return try await VPhoneLaunchpadDownload.fetch(
+ Self.request(downloadURL, token: token),
+ as: "\(name).zip",
+ refused: { status in
+ switch status {
+ case 401, 403:
+ VPhoneLaunchpadError(String(localized: "GitHub refused the token. Check that it can read Actions for Lakr233/vphone-cli."))
+ case 404, 410:
+ VPhoneLaunchpadError(String(localized: "This build has expired on GitHub. Choose a newer one."))
+ default:
+ VPhoneLaunchpadError(String(localized: "Unable to download \(name). Check your connection and try again."))
+ }
+ },
+ progress: progress,
+ )
+ }
+
+ /// Unpacks the artifact next to itself and returns the bundle zip in it.
+ @concurrent static func bundleArchive(in artifact: URL) async throws -> URL {
+ let directory = artifact.deletingLastPathComponent().appendingPathComponent("artifact", isDirectory: true)
+ let process = Process()
+ process.executableURL = URL(fileURLWithPath: "/usr/bin/ditto")
+ process.arguments = ["-x", "-k", artifact.path, directory.path]
+ process.standardInput = FileHandle.nullDevice
+ process.standardOutput = FileHandle.nullDevice
+ process.standardError = FileHandle.nullDevice
+ try process.run()
+ process.waitUntilExit()
+ let names = (try? FileManager.default.contentsOfDirectory(atPath: directory.path)) ?? []
+ guard process.terminationStatus == 0,
+ let name = names.first(where: { $0.range(of: "^VPhone-.+\\.zip$", options: .regularExpression) != nil })
+ else {
+ throw VPhoneLaunchpadError(String(localized: "The artifact does not contain a VPhone bundle zip."))
+ }
+ return directory.appendingPathComponent(name)
+ }
+}
+
+// MARK: - Token
+
+/// The GitHub token for downloading artifacts, kept in the login keychain.
+nonisolated enum VPhoneLaunchpadGitHubToken {
+ private static var query: [CFString: Any] {
+ [
+ kSecClass: kSecClassGenericPassword,
+ kSecAttrService: "com.vphone.launchpad.github",
+ kSecAttrAccount: "actions",
+ ]
+ }
+
+ static func load() -> String? {
+ var query = query
+ query[kSecReturnData] = true
+ query[kSecMatchLimit] = kSecMatchLimitOne
+ var result: CFTypeRef?
+ guard SecItemCopyMatching(query as CFDictionary, &result) == errSecSuccess,
+ let data = result as? Data
+ else {
+ return nil
+ }
+ return String(data: data, encoding: .utf8)
+ }
+
+ static func save(_ token: String) throws {
+ SecItemDelete(query as CFDictionary)
+ var item = query
+ item[kSecValueData] = Data(token.utf8)
+ let status = SecItemAdd(item as CFDictionary, nil)
+ guard status == errSecSuccess else {
+ throw VPhoneLaunchpadError(
+ String(localized: "Unable to save the token in the keychain."),
+ detail: SecCopyErrorMessageString(status, nil) as String?,
+ )
+ }
+ }
+
+ static func delete() {
+ SecItemDelete(query as CFDictionary)
+ }
+}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundle.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundle.swift
index 4b5a01b9..a771ee3c 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundle.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundle.swift
@@ -27,7 +27,7 @@ final class VPhoneLaunchpadCoreBundle {
// MARK: - Install progress
- enum InstallStep: CaseIterable, Identifiable {
+ enum InstallStep: String, CaseIterable, Identifiable, Codable {
case prepare
case download
case verify
@@ -41,7 +41,7 @@ final class VPhoneLaunchpadCoreBundle {
var title: String {
switch self {
- case .prepare: String(localized: "Read local build")
+ case .prepare: String(localized: "Prepare bundle")
case .download: String(localized: "Download")
case .verify: String(localized: "Verify SHA-256")
case .install: String(localized: "Install as root")
@@ -51,48 +51,114 @@ final class VPhoneLaunchpadCoreBundle {
}
}
- struct InstallProgress {
+ /// Where an install came from, kept so Retry can start it again after a
+ /// relaunch, when the downloaded files are gone.
+ enum InstallSource: Codable {
+ case release(VPhoneLaunchpadRelease)
+ case artifact(VPhoneLaunchpadArtifact)
+ case local(path: String)
+ }
+
+ /// The last install and how far it got. It is written to disk on every
+ /// change, so it survives quitting Launchpad; a step that was running
+ /// then comes back as failed and can be retried.
+ struct InstallProgress: Codable {
/// The store version, once known. A local build's comes from its
/// Info.plist in the prepare step.
var version: String?
- let source: String
+ let source: InstallSource
+ let name: String
let size: Int64
let plan: [InstallStep]
var steps: [InstallStep: VPhoneLaunchpadStatus] = [:]
var received: Int64 = 0
- var error: VPhoneLaunchpadError?
+ var errorMessage: String?
+ var errorDetail: String?
+ var startedAt = Date()
init(release: VPhoneLaunchpadRelease) {
version = release.version
- source = release.assetName
+ source = .release(release)
+ name = release.assetName
size = release.size
plan = [.download, .verify, .install, .policy, .preflight]
}
init(local: URL) {
- source = local.lastPathComponent
+ source = .local(path: local.path)
+ name = local.lastPathComponent
size = 0
plan = [.prepare, .install, .policy, .preflight]
}
+ /// The version is read from the bundle once the artifact is unpacked.
+ init(artifact: VPhoneLaunchpadArtifact) {
+ source = .artifact(artifact)
+ name = artifact.name
+ size = artifact.size
+ plan = [.download, .verify, .prepare, .install, .policy, .preflight]
+ }
+
func status(_ step: InstallStep) -> VPhoneLaunchpadStatus {
steps[step] ?? .pending
}
+
+ var error: VPhoneLaunchpadError? {
+ get { errorMessage.map { VPhoneLaunchpadError($0, detail: errorDetail) } }
+ set {
+ errorMessage = newValue?.message
+ errorDetail = newValue?.detail
+ }
+ }
+
+ /// Every step passed, or was skipped.
+ var isFinished: Bool {
+ plan.allSatisfy { status($0) == .passed || status($0) == .warning }
+ }
+
+ /// Once the bundle is in the store, only the checks after it failed,
+ /// and those may be skipped.
+ var canSkip: Bool {
+ error != nil && status(.install) == .passed
+ }
+
+ var overall: VPhoneLaunchpadStatus {
+ if error != nil {
+ return .failed
+ }
+ if !isFinished {
+ return .running
+ }
+ return plan.contains { status($0) == .warning } ? .warning : .passed
+ }
}
private(set) var installed: [Installed] = []
private(set) var releases: [VPhoneLaunchpadRelease] = []
private(set) var releasesError: String?
- private(set) var progress: InstallProgress?
+ private(set) var artifacts: [VPhoneLaunchpadArtifact] = []
+ private(set) var artifactsError: String?
+ private(set) var hasGitHubToken = VPhoneLaunchpadGitHubToken.load() != nil
+ private(set) var progress: InstallProgress? {
+ didSet { Self.saveProgress(progress) }
+ }
+
var actionError: VPhoneLaunchpadError?
private let helper: VPhoneLaunchpadHelperClient
private let history: VPhoneLaunchpadCommandHistory
private static let activeVersionKey = "VPhoneLaunchpadActiveBundleVersion"
+ private static let acceptedVersionsKey = "VPhoneLaunchpadAcceptedBundleVersions"
init(helper: VPhoneLaunchpadHelperClient, history: VPhoneLaunchpadCommandHistory) {
self.helper = helper
self.history = history
+ #if DEBUG
+ if VPhoneLaunchpadPreview.isActive {
+ return
+ }
+ #endif
+ progress = Self.loadProgress()
}
// MARK: - Active version
@@ -117,16 +183,47 @@ final class VPhoneLaunchpadCoreBundle {
installed.first { $0.version == activeVersion }
}
- /// Machines appears once the active bundle has passed host preflight.
+ /// The active bundle passed host preflight, or the user chose to use it
+ /// without.
var isReady: Bool {
- active?.preflight == .passed
+ guard let active else {
+ return false
+ }
+ return active.preflight == .passed || isAccepted(active.version)
}
var isInstalling: Bool {
guard let progress else {
return false
}
- return progress.error == nil && progress.status(.preflight) != .passed
+ return progress.error == nil && !progress.isFinished
+ }
+
+ // MARK: - Accepted versions
+
+ /// Versions whose failed preflight the user chose to skip.
+ private var acceptedVersions: Set<String> {
+ get {
+ access(keyPath: \.acceptedVersions)
+ return Set(UserDefaults.standard.stringArray(forKey: Self.acceptedVersionsKey) ?? [])
+ }
+ set {
+ withMutation(keyPath: \.acceptedVersions) {
+ UserDefaults.standard.set(newValue.sorted(), forKey: Self.acceptedVersionsKey)
+ }
+ }
+ }
+
+ func isAccepted(_ version: String) -> Bool {
+ acceptedVersions.contains(version)
+ }
+
+ func setAccepted(_ version: String, _ isAccepted: Bool) {
+ if isAccepted {
+ acceptedVersions.insert(version)
+ } else {
+ acceptedVersions.remove(version)
+ }
}
/// The newest release that is not installed yet, if it is newer than
@@ -156,6 +253,7 @@ final class VPhoneLaunchpadCoreBundle {
await verify(version)
}
await fetchReleases()
+ await fetchArtifacts()
}
func fetchReleases() async {
@@ -167,6 +265,31 @@ final class VPhoneLaunchpadCoreBundle {
}
}
+ func fetchArtifacts() async {
+ do {
+ artifacts = try await VPhoneLaunchpadArtifact.fetch(token: VPhoneLaunchpadGitHubToken.load())
+ artifactsError = nil
+ } catch {
+ artifactsError = error.localizedDescription
+ }
+ }
+
+ /// An empty token removes the saved one.
+ func setGitHubToken(_ token: String) {
+ let token = token.trimmingCharacters(in: .whitespacesAndNewlines)
+ do {
+ if token.isEmpty {
+ VPhoneLaunchpadGitHubToken.delete()
+ } else {
+ try VPhoneLaunchpadGitHubToken.save(token)
+ }
+ } catch {
+ actionError = error as? VPhoneLaunchpadError
+ ?? VPhoneLaunchpadError(String(localized: "Unable to save the token in the keychain."), detail: error.localizedDescription)
+ }
+ hasGitHubToken = VPhoneLaunchpadGitHubToken.load() != nil
+ }
+
private func loadInstalled() {
let names = (try? FileManager.default.contentsOfDirectory(atPath: VPhoneLaunchpadBundleStore.root.path)) ?? []
let receipts = names
@@ -306,7 +429,58 @@ final class VPhoneLaunchpadCoreBundle {
}
}
- /// The steps a release and a local build share: the helper installs the
+ /// Installs the bundle inside a GitHub Actions artifact as
+ /// `<version>-ci.<commit>`. The artifact is checked against the digest
+ /// GitHub published; the bundle zip inside it is then handed over like a
+ /// local build.
+ func installArtifact(_ artifact: VPhoneLaunchpadArtifact) async {
+ progress = InstallProgress(artifact: artifact)
+ var archive: URL?
+ var work: URL?
+ defer {
+ if let archive {
+ try? FileManager.default.removeItem(at: archive.deletingLastPathComponent())
+ }
+ if let work {
+ try? FileManager.default.removeItem(at: work)
+ }
+ }
+ do {
+ guard let token = VPhoneLaunchpadGitHubToken.load() else {
+ throw VPhoneLaunchpadError(String(localized: "Add a GitHub token to download builds from GitHub Actions."))
+ }
+ set(.download, .running)
+ let (file, digest) = try await artifact.download(token: token) { received in
+ DispatchQueue.main.async {
+ MainActor.assumeIsolated { self.progress?.received = received }
+ }
+ }
+ archive = file
+ set(.download, .passed)
+
+ set(.verify, .running)
+ guard digest == artifact.sha256.lowercased() else {
+ throw VPhoneLaunchpadError(
+ String(localized: "The download could not be verified. Try again."),
+ detail: String(localized: "Expected \(artifact.sha256)\nReceived \(digest)"),
+ )
+ }
+ set(.verify, .passed)
+
+ set(.prepare, .running)
+ let bundleArchive = try await VPhoneLaunchpadArtifact.bundleArchive(in: file)
+ let local = try await VPhoneLaunchpadLocalBundle.prepare(bundleArchive, suffix: artifact.versionSuffix)
+ work = local.workDirectory
+ progress?.version = local.version
+ set(.prepare, .passed)
+
+ try await installAndVerify(version: local.version, archive: local.archive, sha256: local.sha256)
+ } catch {
+ fail(error)
+ }
+ }
+
+ /// The steps every source shares: the helper installs the
/// archive as root, then the new version becomes active and is checked.
private func installAndVerify(version: String, archive: URL, sha256: String) async throws {
set(.install, .running)
@@ -317,6 +491,12 @@ final class VPhoneLaunchpadCoreBundle {
loadInstalled()
activeVersion = version
+ try await checkInstalled(version)
+ }
+
+ /// The policy exception and host preflight for a bundle already in the
+ /// store.
+ private func checkInstalled(_ version: String) async throws {
set(.policy, .running)
set(.preflight, .running)
await verify(version)
@@ -325,7 +505,7 @@ final class VPhoneLaunchpadCoreBundle {
set(.preflight, installed?.preflight ?? .failed)
if installed?.preflight != .passed {
throw VPhoneLaunchpadError(
- String(localized: "Host preflight failed. Fix the issue below, then choose Run Preflight Again."),
+ String(localized: "Host preflight failed. Fix the issue and retry, or skip to use this version anyway."),
detail: installed?.preflightDetail,
)
}
@@ -339,10 +519,94 @@ final class VPhoneLaunchpadCoreBundle {
?? VPhoneLaunchpadError(String(localized: "Unable to install the bundle. Try again."), detail: error.localizedDescription)
}
+ // MARK: - Retry and skip
+
+ /// Runs the failed install again. Once the bundle is in the store only
+ /// the checks after it run again; before that the whole install starts
+ /// over, since a download does not outlive the attempt.
+ func retry() async {
+ guard let progress, !isInstalling else {
+ return
+ }
+ if progress.status(.install) == .passed, let version = progress.version,
+ installed.contains(where: { $0.version == version })
+ {
+ self.progress?.error = nil
+ do {
+ try await checkInstalled(version)
+ } catch {
+ fail(error)
+ }
+ return
+ }
+ switch progress.source {
+ case let .release(release):
+ await install(release)
+ case let .artifact(artifact):
+ await installArtifact(artifact)
+ case let .local(path):
+ await installLocal(URL(fileURLWithPath: path))
+ }
+ }
+
+ /// Accepts a bundle whose policy exception or preflight failed, so it can
+ /// be used anyway. The choice is remembered for that version.
+ func skipFailedChecks() {
+ guard let current = progress, current.canSkip, let version = current.version else {
+ return
+ }
+ for step in current.plan where current.status(step) != .passed {
+ set(step, .warning)
+ }
+ progress?.error = nil
+ setAccepted(version, true)
+ }
+
func dismissProgress() {
progress = nil
}
+ // MARK: - Persistence
+
+ private static var progressFile: URL {
+ URL.applicationSupportDirectory
+ .appendingPathComponent("vphone-launchpad", isDirectory: true)
+ .appendingPathComponent("bundle-install.json")
+ }
+
+ private static func saveProgress(_ progress: InstallProgress?) {
+ #if DEBUG
+ if VPhoneLaunchpadPreview.isActive {
+ return
+ }
+ #endif
+ let file = progressFile
+ guard let progress else {
+ try? FileManager.default.removeItem(at: file)
+ return
+ }
+ try? FileManager.default.createDirectory(at: file.deletingLastPathComponent(), withIntermediateDirectories: true)
+ try? VPhoneLaunchpadBundleReceipt.encoder.encode(progress).write(to: file, options: .atomic)
+ }
+
+ /// A step still marked running belonged to a Launchpad that quit.
+ private static func loadProgress() -> InstallProgress? {
+ guard let data = try? Data(contentsOf: progressFile),
+ var progress = try? VPhoneLaunchpadBundleReceipt.decoder.decode(InstallProgress.self, from: data)
+ else {
+ return nil
+ }
+ let interrupted = progress.plan.filter { progress.status($0) == .running }
+ guard !interrupted.isEmpty else {
+ return progress
+ }
+ for step in interrupted {
+ progress.steps[step] = .failed
+ }
+ progress.error = VPhoneLaunchpadError(String(localized: "Launchpad quit before the install finished. Retry to continue."))
+ return progress
+ }
+
private func set(_ step: InstallStep, _ status: VPhoneLaunchpadStatus) {
progress?.steps[step] = status
}
@@ -362,6 +626,9 @@ final class VPhoneLaunchpadCoreBundle {
actionError = VPhoneLaunchpadError(String(localized: "Unable to Remove VPhone.bundle \(version)"), detail: error.localizedDescription)
}
loadInstalled()
+ if !installed.contains(where: { $0.version == version }) {
+ setAccepted(version, false)
+ }
}
}
@@ -369,6 +636,8 @@ final class VPhoneLaunchpadCoreBundle {
extension VPhoneLaunchpadCoreBundle {
func applyPreview(installing: Bool) {
releases = VPhoneLaunchpadPreview.releases
+ artifacts = VPhoneLaunchpadPreview.artifacts
+ hasGitHubToken = false
if installing {
installed = []
var progress = InstallProgress(release: releases[0])
@@ -377,7 +646,13 @@ final class VPhoneLaunchpadCoreBundle {
self.progress = progress
return
}
- progress = nil
+ var progress = InstallProgress(release: releases[1])
+ progress.steps = [.download: .passed, .verify: .passed, .install: .passed, .policy: .passed, .preflight: .failed]
+ progress.error = VPhoneLaunchpadError(
+ String(localized: "Host preflight failed. Fix the issue and retry, or skip to use this version anyway."),
+ detail: "AMFI blocked vphone-vm",
+ )
+ self.progress = progress
installed = VPhoneLaunchpadPreview.releases.dropFirst().map { release in
var bundle = Installed(receipt: VPhoneLaunchpadBundleReceipt(
version: release.version,
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundleView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundleView.swift
index 2fe6deb9..646f3838 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundleView.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundleView.swift
@@ -2,8 +2,16 @@ import SwiftUI
import UniformTypeIdentifiers
struct VPhoneLaunchpadCoreBundleView: View {
+ enum Source: Hashable {
+ case releases
+ case actions
+ }
+
@Environment(VPhoneLaunchpadModel.self) private var model
+ @Environment(\.dismiss) private var dismiss
@State private var removal: String?
+ @State private var source = Source.releases
+ @State private var token = ""
private var bundles: VPhoneLaunchpadCoreBundle {
model.bundles
@@ -14,52 +22,50 @@ struct VPhoneLaunchpadCoreBundleView: View {
}
var body: some View {
+ @Bindable var bundles = bundles
Form {
- if let progress = bundles.progress {
- progressSection(progress)
- }
- if bundles.installed.isEmpty {
- latestSection
- } else {
- installedSection
- if !notInstalled.isEmpty {
- availableSection
- }
- }
- Section {
- LabeledContent("Location", value: VPhoneLaunchpadBundleStore.root.path)
- LabeledContent("Owner", value: String(localized: "root:wheel, written only by the helper"))
- } header: {
- Text("Store")
- } footer: {
- if bundles.installed.isEmpty {
- Text("Machines appears once a bundle is installed and passes host preflight.")
+ if bundles.isInstalling {
+ Section {
+ Text("An install is in progress. Follow it in the inspector.")
.foregroundStyle(.secondary)
}
}
+ if !bundles.installed.isEmpty {
+ installedSection
+ }
+ availableSection
}
.formStyle(.grouped)
- .toolbar {
- ToolbarItem(placement: .primaryAction) {
- Button {
+ .navigationTitle("Core Bundle")
+ .frame(width: 640, height: 480)
+ .errorAlert($bundles.actionError)
+ #if DEBUG
+ .onAppear {
+ if VPhoneLaunchpadPreview.isActive {
+ source = VPhoneLaunchpadPreview.coreBundleSource
+ }
+ }
+ #endif
+ .toolbar {
+ ToolbarItem(placement: .automatic) {
+ Button("Install Local Build…") {
chooseLocalBuild()
- } label: {
- Label("Install Local Build…", systemImage: "shippingbox")
}
.help(model.canInstallBundles
? "Install a VPhone.bundle folder or .zip built on this Mac."
: "Installing needs the privileged helper and Developer Tools access.")
.disabled(!model.canInstallBundles)
}
- ToolbarItem(placement: .primaryAction) {
- Button {
+ ToolbarItem(placement: .automatic) {
+ Button("Check for Updates") {
Task { await bundles.refresh() }
- } label: {
- Label("Check for Updates", systemImage: "arrow.clockwise")
}
- .help("Reload releases and run host preflight again.")
+ .help("Reload releases and builds, and run host preflight again.")
.disabled(bundles.isInstalling)
}
+ ToolbarItem(placement: .confirmationAction) {
+ Button("Done") { dismiss() }
+ }
}
.confirmationDialog(
"Remove VPhone.bundle \(removal ?? "")?",
@@ -79,72 +85,18 @@ struct VPhoneLaunchpadCoreBundleView: View {
}
}
- // MARK: - Latest
-
- private var latestSection: some View {
- Section("Latest Release") {
- if let latest = bundles.releases.first {
- releaseRow(latest, prominent: true)
- } else if let error = bundles.releasesError {
- Label(error, systemImage: "exclamationmark.triangle")
- .foregroundStyle(.secondary)
- } else {
- HStack {
- ProgressView().controlSize(.small)
- Text("Loading releases…").foregroundStyle(.secondary)
- }
- }
- }
- }
-
- // MARK: - Progress
-
- private func progressSection(_ progress: VPhoneLaunchpadCoreBundle.InstallProgress) -> some View {
- Section {
- if progress.status(.download) == .running {
- ProgressView(value: Double(progress.received), total: Double(max(progress.size, 1))) {
- Text("Downloading…")
- } currentValueLabel: {
- Text("\(Self.size(progress.received)) of \(Self.size(progress.size))")
- }
- }
- ForEach(progress.plan) { step in
- Label {
- Text(step.title)
- } icon: {
- VPhoneLaunchpadStatusIcon(status: progress.status(step))
- }
- }
- if let error = progress.error {
- VStack(alignment: .leading, spacing: 4) {
- Text(error.message).foregroundStyle(.red)
- if let detail = error.detail {
- Text(detail)
- .font(.callout)
- .foregroundStyle(.secondary)
- .textSelection(.enabled)
- }
- }
- }
- } header: {
- HStack {
- Text("Installing \(progress.version ?? progress.source)")
- Spacer()
- if !bundles.isInstalling {
- Button("Dismiss") { bundles.dismissProgress() }
- .buttonStyle(.link)
- }
- }
- }
- }
-
// MARK: - Installed
private var installedSection: some View {
- Section("Installed") {
+ Section {
ForEach(bundles.installed) { bundle in
installedRow(bundle)
}
+ } header: {
+ Text("Installed")
+ } footer: {
+ Text("Stored in \(VPhoneLaunchpadBundleStore.root.path), owned by root and written only by the helper.")
+ .foregroundStyle(.secondary)
}
}
@@ -160,6 +112,8 @@ struct VPhoneLaunchpadCoreBundleView: View {
Group {
if VPhoneLaunchpadLocalBundle.isLocal(version: bundle.version) {
Text("Local build · Installed \(bundle.receipt.installedAt.formatted(date: .abbreviated, time: .shortened)) · SHA-256 \(Self.shortDigest(bundle.receipt.sha256))")
+ } else if bundle.version != VPhoneLaunchpadNames.bundleVersion(of: bundle.version) {
+ Text("GitHub Actions build · Installed \(bundle.receipt.installedAt.formatted(date: .abbreviated, time: .shortened)) · SHA-256 \(Self.shortDigest(bundle.receipt.sha256))")
} else {
Text("Installed \(bundle.receipt.installedAt.formatted(date: .abbreviated, time: .omitted)) · SHA-256 \(Self.shortDigest(bundle.receipt.sha256))")
}
@@ -169,24 +123,24 @@ struct VPhoneLaunchpadCoreBundleView: View {
}
Spacer()
Label {
- Text(bundle.policy == .passed ? "Policy exception" : "No policy exception")
- } icon: {
- VPhoneLaunchpadStatusIcon(status: bundle.policy)
- }
- .font(.callout)
- Label {
- Text(bundle.preflight == .passed ? String(localized: "Preflight passed") : bundle.preflightDetail.isEmpty ? String(localized: "Preflight") : bundle.preflightDetail)
+ Text(checkSummary(bundle))
.lineLimit(1)
+ .truncationMode(.tail)
} icon: {
- VPhoneLaunchpadStatusIcon(status: bundle.preflight)
+ VPhoneLaunchpadStatusIcon(status: checkStatus(bundle))
}
.font(.callout)
- .help(bundle.preflightDetail)
+ .help(checkHelp(bundle))
Menu {
Button("Use This Version") { Task { await bundles.use(bundle.version) } }
.disabled(isActive || !VPhoneLaunchpadNames.isCompatibleBundleVersion(bundle.version))
Button("Run Preflight Again") { Task { await bundles.verify(bundle.version) } }
.disabled(!VPhoneLaunchpadNames.isCompatibleBundleVersion(bundle.version))
+ if bundles.isAccepted(bundle.version) {
+ Button("Require Preflight") { bundles.setAccepted(bundle.version, false) }
+ } else if bundle.preflight == .failed, VPhoneLaunchpadNames.isCompatibleBundleVersion(bundle.version) {
+ Button("Use Without Preflight") { bundles.setAccepted(bundle.version, true) }
+ }
Button("Show in Finder") {
NSWorkspace.shared.activateFileViewerSelecting([VPhoneLaunchpadBundleStore.bundle(version: bundle.version)])
}
@@ -202,14 +156,153 @@ struct VPhoneLaunchpadCoreBundleView: View {
}
}
+ /// Policy exception and preflight folded into one status: the worst of
+ /// the two, with a skipped preflight shown as a warning.
+ private func checkStatus(_ bundle: VPhoneLaunchpadCoreBundle.Installed) -> VPhoneLaunchpadStatus {
+ if bundle.policy == .running || bundle.preflight == .running {
+ return .running
+ }
+ if bundle.policy == .passed, bundle.preflight == .passed {
+ return .passed
+ }
+ if bundles.isAccepted(bundle.version) {
+ return .warning
+ }
+ return bundle.policy == .pending && bundle.preflight == .pending ? .pending : .failed
+ }
+
+ private func checkSummary(_ bundle: VPhoneLaunchpadCoreBundle.Installed) -> String {
+ switch checkStatus(bundle) {
+ case .running: String(localized: "Checking…")
+ case .passed: String(localized: "Preflight passed")
+ case .warning: String(localized: "Preflight skipped")
+ case .pending: String(localized: "Not checked")
+ case .failed: bundle.policy != .passed ? String(localized: "No policy exception") : String(localized: "Preflight failed")
+ }
+ }
+
+ private func checkHelp(_ bundle: VPhoneLaunchpadCoreBundle.Installed) -> String {
+ let policy = bundle.policy == .passed ? String(localized: "Policy exception added.") : String(localized: "No policy exception.")
+ return bundle.preflightDetail.isEmpty ? policy : "\(policy)\n\(bundle.preflightDetail)"
+ }
+
// MARK: - Available
private var availableSection: some View {
- Section("Available") {
- ForEach(notInstalled) { release in
- releaseRow(release, prominent: release == bundles.availableUpdate)
+ Section {
+ Picker("Source", selection: $source) {
+ Text("Releases").tag(Source.releases)
+ Text("GitHub Actions").tag(Source.actions)
+ }
+ .pickerStyle(.segmented)
+ switch source {
+ case .releases:
+ if let error = bundles.releasesError, bundles.releases.isEmpty {
+ Label(error, systemImage: "exclamationmark.triangle")
+ .foregroundStyle(.secondary)
+ } else if bundles.releases.isEmpty {
+ loadingRow("Loading releases…")
+ } else if notInstalled.isEmpty {
+ Text("Every release is installed.")
+ .foregroundStyle(.secondary)
+ } else {
+ ForEach(notInstalled) { release in
+ releaseRow(release, prominent: release == bundles.availableUpdate)
+ }
+ }
+ case .actions:
+ tokenRow
+ if let error = bundles.artifactsError, bundles.artifacts.isEmpty {
+ Label(error, systemImage: "exclamationmark.triangle")
+ .foregroundStyle(.secondary)
+ } else if bundles.artifacts.isEmpty {
+ Text("No GitHub Actions builds are available.")
+ .foregroundStyle(.secondary)
+ } else {
+ ForEach(bundles.artifacts) { artifact in
+ artifactRow(artifact)
+ }
+ }
+ }
+ } header: {
+ Text("Available")
+ } footer: {
+ if source == .actions {
+ Text("Builds from the package workflow, kept by GitHub for 7 days. Downloading them needs a token that can read Actions for Lakr233/vphone-cli. It is stored in your keychain.")
+ .foregroundStyle(.secondary)
+ }
+ }
+ }
+
+ private func loadingRow(_ title: LocalizedStringKey) -> some View {
+ HStack {
+ ProgressView().controlSize(.small)
+ Text(title).foregroundStyle(.secondary)
+ }
+ }
+
+ // MARK: - GitHub Actions
+
+ @ViewBuilder
+ private var tokenRow: some View {
+ if bundles.hasGitHubToken {
+ LabeledContent("GitHub Token") {
+ HStack {
+ Text("Saved in the keychain")
+ .foregroundStyle(.secondary)
+ Button("Remove") {
+ bundles.setGitHubToken("")
+ }
+ }
+ }
+ } else {
+ LabeledContent("GitHub Token") {
+ HStack {
+ SecureField("GitHub Token", text: $token, prompt: Text(verbatim: "github_pat_…"))
+ .labelsHidden()
+ .onSubmit(saveToken)
+ Button("Save", action: saveToken)
+ .disabled(token.trimmingCharacters(in: .whitespaces).isEmpty)
+ }
+ }
+ }
+ }
+
+ private func saveToken() {
+ bundles.setGitHubToken(token)
+ token = ""
+ Task { await bundles.fetchArtifacts() }
+ }
+
+ private func artifactRow(_ artifact: VPhoneLaunchpadArtifact) -> some View {
+ let isInstalled = bundles.installed.contains { $0.version.hasSuffix(artifact.versionSuffix) }
+ let canInstall = model.canInstallBundles && bundles.hasGitHubToken
+ return HStack(alignment: .firstTextBaseline) {
+ VStack(alignment: .leading, spacing: 2) {
+ HStack(alignment: .firstTextBaseline, spacing: 6) {
+ Text(verbatim: "VPhone.bundle")
+ Link(destination: artifact.runURL) {
+ Text(verbatim: artifact.branch.isEmpty ? artifact.shortCommit : "\(artifact.branch) @ \(artifact.shortCommit)")
+ .monospaced()
+ }
+ .help("Open the workflow run on GitHub")
+ }
+ Text("\(artifact.createdAt.formatted(date: .abbreviated, time: .shortened)) · \(Self.size(artifact.size)) · Expires \(artifact.expiresAt.formatted(.relative(presentation: .named)))")
+ .font(.caption)
+ .foregroundStyle(.secondary)
+ }
+ Spacer()
+ if isInstalled {
+ Text("Installed")
+ .foregroundStyle(.secondary)
+ } else {
+ Button("Download and Install") { Task { await model.installArtifact(artifact) } }
+ .disabled(!canInstall)
}
}
+ .help(canInstall || isInstalled ? ""
+ : model.canInstallBundles ? "Add a GitHub token to download builds from GitHub Actions."
+ : "Installing needs the privileged helper and Developer Tools access.")
}
private func releaseRow(_ release: VPhoneLaunchpadRelease, prominent: Bool) -> some View {
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadDownload.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadDownload.swift
new file mode 100644
index 00000000..84ed0abc
--- /dev/null
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadDownload.swift
@@ -0,0 +1,73 @@
+import CryptoKit
+import Foundation
+
+/// Streams one file from GitHub into a fresh temporary directory, hashing as
+/// it goes. Release assets and Actions artifacts both redirect to storage on
+/// another host, which gets the request without the token.
+nonisolated enum VPhoneLaunchpadDownload {
+ /// Returns the file and its hex SHA-256. The caller removes the file's
+ /// directory when it is done with it. A response other than 200 throws
+ /// what `refused` makes of its status code.
+ static func fetch(
+ _ request: URLRequest,
+ as name: String,
+ refused: @Sendable (Int) -> Error,
+ progress: @escaping @Sendable (Int64) -> Void,
+ ) async throws -> (URL, String) {
+ var request = request
+ request.setValue("vphone-launchpad", forHTTPHeaderField: "User-Agent")
+ let (bytes, response) = try await URLSession.shared.bytes(for: request, delegate: RedirectWithoutToken())
+ let status = (response as? HTTPURLResponse)?.statusCode ?? 0
+ guard status == 200 else {
+ throw refused(status)
+ }
+
+ let directory = FileManager.default.temporaryDirectory
+ .appendingPathComponent("vphone-launchpad-\(UUID().uuidString)", isDirectory: true)
+ try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
+ let file = directory.appendingPathComponent(name)
+ FileManager.default.createFile(atPath: file.path, contents: nil)
+ let output = try FileHandle(forWritingTo: file)
+ defer { try? output.close() }
+
+ var hasher = SHA256()
+ var buffer = Data()
+ buffer.reserveCapacity(1 << 20)
+ var received: Int64 = 0
+ for try await byte in bytes {
+ buffer.append(byte)
+ if buffer.count >= 1 << 20 {
+ hasher.update(data: buffer)
+ try output.write(contentsOf: buffer)
+ received += Int64(buffer.count)
+ progress(received)
+ buffer.removeAll(keepingCapacity: true)
+ }
+ }
+ hasher.update(data: buffer)
+ try output.write(contentsOf: buffer)
+ received += Int64(buffer.count)
+ progress(received)
+
+ let digest = hasher.finalize().map { String(format: "%02x", $0) }.joined()
+ return (file, digest)
+ }
+
+ /// The token is for api.github.com only. The signed storage URL it
+ /// redirects to needs none and must not see it.
+ private final class RedirectWithoutToken: NSObject, URLSessionTaskDelegate, Sendable {
+ func urlSession(
+ _: URLSession,
+ task: URLSessionTask,
+ willPerformHTTPRedirection _: HTTPURLResponse,
+ newRequest request: URLRequest,
+ completionHandler: @escaping @Sendable (URLRequest?) -> Void,
+ ) {
+ var request = request
+ if request.url?.host != task.originalRequest?.url?.host {
+ request.setValue(nil, forHTTPHeaderField: "Authorization")
+ }
+ completionHandler(request)
+ }
+ }
+}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadInstallSection.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadInstallSection.swift
new file mode 100644
index 00000000..ae1e30bb
--- /dev/null
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadInstallSection.swift
@@ -0,0 +1,121 @@
+import SwiftUI
+
+/// The last Core Bundle install, as a section at the top of the inspector.
+/// Its header collapses it to one summary row. It stays until dismissed,
+/// across relaunches, and offers Retry and Skip when a step fails.
+struct VPhoneLaunchpadInstallSection: View {
+ @Environment(VPhoneLaunchpadModel.self) private var model
+
+ private var bundles: VPhoneLaunchpadCoreBundle {
+ model.bundles
+ }
+
+ var body: some View {
+ if let progress = bundles.progress {
+ Section {
+ summary(progress)
+ if model.isInstallExpanded {
+ details(progress)
+ }
+ } header: {
+ header
+ }
+ }
+ }
+
+ private var header: some View {
+ Button {
+ withAnimation(.snappy(duration: 0.2)) { model.isInstallExpanded.toggle() }
+ } label: {
+ HStack(spacing: 4) {
+ Text("Core Bundle Install")
+ Spacer()
+ Image(systemName: "chevron.right")
+ .rotationEffect(.degrees(model.isInstallExpanded ? 90 : 0))
+ .foregroundStyle(.secondary)
+ }
+ .contentShape(Rectangle())
+ }
+ .buttonStyle(.plain)
+ .help(model.isInstallExpanded ? "Hide the install steps" : "Show the install steps")
+ }
+
+ // MARK: - Summary
+
+ private func summary(_ progress: VPhoneLaunchpadCoreBundle.InstallProgress) -> some View {
+ HStack(spacing: 8) {
+ VPhoneLaunchpadStatusIcon(status: progress.overall)
+ Text(verbatim: progress.version.map { "VPhone.bundle \($0)" } ?? progress.name)
+ .lineLimit(1)
+ .truncationMode(.middle)
+ Spacer(minLength: 8)
+ Text(state(progress))
+ .foregroundStyle(.secondary)
+ .lineLimit(1)
+ }
+ }
+
+ private func state(_ progress: VPhoneLaunchpadCoreBundle.InstallProgress) -> String {
+ switch progress.overall {
+ case .running: String(localized: "Installing…")
+ case .failed where progress.status(.install) == .passed: String(localized: "Checks failed")
+ case .failed: String(localized: "Not installed")
+ case .warning: String(localized: "Checks skipped")
+ default: String(localized: "Installed")
+ }
+ }
+
+ // MARK: - Details
+
+ @ViewBuilder
+ private func details(_ progress: VPhoneLaunchpadCoreBundle.InstallProgress) -> some View {
+ ForEach(progress.plan) { step in
+ HStack(spacing: 8) {
+ VPhoneLaunchpadStatusIcon(status: progress.status(step))
+ Text(step.title)
+ Spacer(minLength: 8)
+ if step == .download, progress.status(.download) == .running {
+ Text("\(VPhoneLaunchpadCoreBundleView.size(progress.received)) of \(VPhoneLaunchpadCoreBundleView.size(progress.size))")
+ .foregroundStyle(.secondary)
+ .monospacedDigit()
+ } else if progress.status(step) == .warning {
+ Text("Skipped")
+ .foregroundStyle(.secondary)
+ }
+ }
+ }
+ if progress.status(.download) == .running {
+ ProgressView(value: Double(progress.received), total: Double(max(progress.size, 1)))
+ .labelsHidden()
+ }
+ if let error = progress.error {
+ VStack(alignment: .leading, spacing: 4) {
+ Text(error.message)
+ if let detail = error.detail {
+ Text(detail)
+ .font(.callout.monospaced())
+ .foregroundStyle(.secondary)
+ .lineLimit(6)
+ }
+ }
+ .textSelection(.enabled)
+ .frame(maxWidth: .infinity, alignment: .leading)
+ }
+ if !bundles.isInstalling {
+ HStack {
+ Spacer()
+ Button("Dismiss") { bundles.dismissProgress() }
+ if progress.canSkip {
+ Button("Skip") { bundles.skipFailedChecks() }
+ .help("Use this version without the failed checks.")
+ }
+ if progress.error != nil {
+ Button("Retry") {
+ Task { await model.retryInstall() }
+ }
+ .disabled(!model.canInstallBundles && progress.status(.install) != .passed)
+ }
+ }
+ }
+ }
+}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadLocalBundle.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadLocalBundle.swift
index 8f00a9bf..7a6123a6 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadLocalBundle.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadLocalBundle.swift
@@ -30,8 +30,12 @@ nonisolated struct VPhoneLaunchpadLocalBundle: Sendable {
// MARK: - Prepare
/// Reads the version from the bundle's Info.plist and produces the zip
- /// and digest the helper expects.
- @concurrent static func prepare(_ source: URL) async throws -> VPhoneLaunchpadLocalBundle {
+ /// and digest the helper expects. A GitHub Actions build passes its own
+ /// suffix in place of `-local`.
+ @concurrent static func prepare(
+ _ source: URL,
+ suffix: String = versionSuffix,
+ ) async throws -> VPhoneLaunchpadLocalBundle {
let values = try? source.resourceValues(forKeys: [.isDirectoryKey])
let isDirectory = values?.isDirectory ?? false
let fileManager = FileManager.default
@@ -75,7 +79,7 @@ nonisolated struct VPhoneLaunchpadLocalBundle: Sendable {
archive = source
}
- let version = try version(from: infoPlist, source: source)
+ let version = try version(from: infoPlist, source: source, suffix: suffix)
return try VPhoneLaunchpadLocalBundle(
version: version,
archive: archive,
@@ -88,14 +92,14 @@ nonisolated struct VPhoneLaunchpadLocalBundle: Sendable {
}
}
- private static func version(from infoPlist: Data, source: URL) throws -> String {
+ private static func version(from infoPlist: Data, source: URL, suffix: String) throws -> String {
guard let plist = try? PropertyListSerialization.propertyList(from: infoPlist, format: nil) as? [String: Any],
plist["CFBundleIdentifier"] as? String == bundleIdentifier,
let shortVersion = plist["CFBundleShortVersionString"] as? String
else {
throw notVPhoneBundle(source)
}
- let version = shortVersion + versionSuffix
+ let version = shortVersion + suffix
guard VPhoneLaunchpadNames.isCompatibleBundleVersion(version) else {
throw VPhoneLaunchpadError(String(localized: "VPhone.bundle \(shortVersion) is not supported. Use version \(VPhoneLaunchpadNames.minimumBundleVersion) or newer."))
}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadRelease.swift b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadRelease.swift
index bebac3f3..973095dd 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadRelease.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadRelease.swift
@@ -1,10 +1,9 @@
-import CryptoKit
import Foundation
/// A GitHub release that carries a `VPhone-<tag>.zip` asset. GitHub records a
/// SHA-256 digest for every asset, which is what the download is checked
/// against, here and again in the helper.
-nonisolated struct VPhoneLaunchpadRelease: Identifiable, Hashable, Sendable {
+nonisolated struct VPhoneLaunchpadRelease: Identifiable, Hashable, Codable, Sendable {
let version: String
let publishedAt: Date
let isPrerelease: Bool
@@ -73,44 +72,17 @@ nonisolated struct VPhoneLaunchpadRelease: Identifiable, Hashable, Sendable {
// MARK: - Download
- /// Downloads the asset into a fresh temporary directory, hashing as it
- /// goes. Returns the file and its hex SHA-256.
+ /// Downloads the asset into a fresh temporary directory. Returns the file
+ /// and its hex SHA-256.
@concurrent func download(progress: @escaping @Sendable (Int64) -> Void) async throws -> (URL, String) {
- var request = URLRequest(url: downloadURL)
- request.setValue("vphone-launchpad", forHTTPHeaderField: "User-Agent")
- let (bytes, response) = try await URLSession.shared.bytes(for: request)
- guard let http = response as? HTTPURLResponse, http.statusCode == 200 else {
- throw VPhoneLaunchpadError(String(localized: "Unable to download \(assetName). Check your connection and try again."))
- }
-
- let directory = FileManager.default.temporaryDirectory
- .appendingPathComponent("vphone-launchpad-\(UUID().uuidString)", isDirectory: true)
- try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true)
- let file = directory.appendingPathComponent(assetName)
- FileManager.default.createFile(atPath: file.path, contents: nil)
- let output = try FileHandle(forWritingTo: file)
- defer { try? output.close() }
-
- var hasher = SHA256()
- var buffer = Data()
- buffer.reserveCapacity(1 << 20)
- var received: Int64 = 0
- for try await byte in bytes {
- buffer.append(byte)
- if buffer.count >= 1 << 20 {
- hasher.update(data: buffer)
- try output.write(contentsOf: buffer)
- received += Int64(buffer.count)
- progress(received)
- buffer.removeAll(keepingCapacity: true)
- }
- }
- hasher.update(data: buffer)
- try output.write(contentsOf: buffer)
- received += Int64(buffer.count)
- progress(received)
-
- let digest = hasher.finalize().map { String(format: "%02x", $0) }.joined()
- return (file, digest)
+ let name = assetName
+ return try await VPhoneLaunchpadDownload.fetch(
+ URLRequest(url: downloadURL),
+ as: name,
+ refused: { _ in
+ VPhoneLaunchpadError(String(localized: "Unable to download \(name). Check your connection and try again."))
+ },
+ progress: progress,
+ )
}
}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift b/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift
index a297e254..416e9ce4 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift
@@ -75,11 +75,45 @@ final class VPhoneLaunchpadHostSetup {
}
var requiredPassed: Bool {
- required.allSatisfy { $0.status == .passed }
+ required.allSatisfy(isSatisfied)
}
var passedRequiredCount: Int {
- required.count(where: { $0.status == .passed })
+ required.count(where: isSatisfied)
+ }
+
+ func isSatisfied(_ check: VPhoneLaunchpadHostCheck) -> Bool {
+ check.status == .passed || isSkipped(check)
+ }
+
+ // MARK: - Skipping
+
+ /// Checks that can misjudge an unusual host, such as a Mac mini in a
+ /// rack or a library on a network volume. The user may take the risk and
+ /// skip them; the bundle's own preflight still runs. Developer Tools
+ /// access and the helper cannot be skipped: installing needs both.
+ static let skippable: Set<VPhoneLaunchpadHostCheck.Kind> = [.macOS, .physicalMac, .libraryVolume]
+ private static let skippedKey = "VPhoneLaunchpadSkippedHostChecks"
+
+ private(set) var skipped: Set<VPhoneLaunchpadHostCheck.Kind> = Set(
+ (UserDefaults.standard.stringArray(forKey: skippedKey) ?? []).compactMap(VPhoneLaunchpadHostCheck.Kind.init),
+ )
+
+ func isSkipped(_ check: VPhoneLaunchpadHostCheck) -> Bool {
+ check.status != .passed && skipped.contains(check.kind)
+ }
+
+ func canSkip(_ check: VPhoneLaunchpadHostCheck) -> Bool {
+ Self.skippable.contains(check.kind) && (check.status == .failed || check.status == .warning)
+ }
+
+ func setSkipped(_ kind: VPhoneLaunchpadHostCheck.Kind, _ isSkipped: Bool) {
+ if isSkipped {
+ skipped.insert(kind)
+ } else {
+ skipped.remove(kind)
+ }
+ UserDefaults.standard.set(skipped.map(\.rawValue).sorted(), forKey: Self.skippedKey)
}
var isDeveloperToolAuthorized: Bool {
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetupView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetupView.swift
index 5b38121d..d4dff19b 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetupView.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetupView.swift
@@ -2,12 +2,14 @@ import SwiftUI
struct VPhoneLaunchpadHostSetupView: View {
@Environment(VPhoneLaunchpadModel.self) private var model
+ @Environment(\.dismiss) private var dismiss
private var host: VPhoneLaunchpadHostSetup {
model.host
}
var body: some View {
+ @Bindable var host = host
Form {
Section {
ForEach(host.required) { check in
@@ -26,7 +28,7 @@ struct VPhoneLaunchpadHostSetupView: View {
if host.checks.contains(where: { $0.kind == .developerTools && $0.status != .passed }) {
Text("Allow vphone-launchpad in Privacy & Security → Developer Tools, then click Reopen.")
}
- Text("Core Bundle appears once every required check passes.")
+ Text("A Core Bundle can be installed once every required check passes.")
}
.foregroundStyle(.secondary)
}
@@ -44,19 +46,28 @@ struct VPhoneLaunchpadHostSetupView: View {
}
}
.formStyle(.grouped)
+ .navigationTitle("Host Setup")
+ .frame(width: 600, height: 560)
.onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ in
host.refreshDeveloperTools()
}
+ .errorAlert($host.actionError)
.toolbar {
- ToolbarItem(placement: .primaryAction) {
- Button {
+ ToolbarItem(placement: .automatic) {
+ Button("Check Again") {
Task { await model.refreshHost() }
- } label: {
- Label("Check Again", systemImage: "arrow.clockwise")
}
.help("Run every check again")
.disabled(host.isChecking)
}
+ ToolbarItem(placement: .confirmationAction) {
+ // Straight on to the next stage while it is not ready.
+ if host.requiredPassed, !model.bundles.isReady {
+ Button("Continue") { model.panel = .coreBundle }
+ } else {
+ Button("Done") { dismiss() }
+ }
+ }
}
}
@@ -65,12 +76,13 @@ struct VPhoneLaunchpadHostSetupView: View {
/// row into columns and truncated the detail while leaving the button
/// short of the edge.
private func row(_ check: VPhoneLaunchpadHostCheck) -> some View {
- HStack(spacing: 8) {
- VPhoneLaunchpadStatusIcon(status: check.status)
+ let isSkipped = host.isSkipped(check)
+ return HStack(spacing: 8) {
+ VPhoneLaunchpadStatusIcon(status: isSkipped ? .warning : check.status)
Text(check.title)
.layoutPriority(1)
Spacer(minLength: 16)
- Text(check.detail)
+ Text(isSkipped ? String(localized: "Skipped · \(check.detail)") : check.detail)
.foregroundStyle(.secondary)
.lineLimit(1)
.truncationMode(.middle)
@@ -104,7 +116,12 @@ struct VPhoneLaunchpadHostSetupView: View {
}
}
default:
- EmptyView()
+ if host.isSkipped(check) {
+ Button("Don’t Skip") { host.setSkipped(check.kind, false) }
+ } else if host.canSkip(check) {
+ Button("Skip") { host.setSkipped(check.kind, true) }
+ .help("Continue without this check. The bundle’s own preflight still runs.")
+ }
}
}
}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings b/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings
index e691f8a8..7f43d966 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Localizable.xcstrings
@@ -1,6 +1,40 @@
{
"sourceLanguage" : "en",
"strings" : {
+ "%@ already exists. Enter another name." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ already exists. Enter another name."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ は既に存在します。別の名前を入力してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@이(가) 이미 있습니다. 다른 이름을 입력하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ đã tồn tại. Hãy nhập tên khác."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ 已存在。请输入其他名称。"
+ }
+ }
+ }
+ },
"%@ Console" : {
"localizations" : {
"en" : {
@@ -103,6 +137,40 @@
}
}
},
+ "%@ does not contain VPhone.bundle at its top level." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ does not contain VPhone.bundle at its top level."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ の最上位に VPhone.bundle がありません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@의 최상위에 VPhone.bundle이 없습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ không chứa VPhone.bundle ở cấp cao nhất."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ 的顶层不包含 VPhone.bundle。"
+ }
+ }
+ }
+ },
"%@ exited with status %d." : {
"localizations" : {
"en" : {
@@ -239,6 +307,40 @@
}
}
},
+ "%@ is not a VPhone.bundle." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ is not a VPhone.bundle."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ は VPhone.bundle ではありません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@은(는) VPhone.bundle이 아닙니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ không phải là VPhone.bundle."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ 不是 VPhone.bundle。"
+ }
+ }
+ }
+ },
"%@ is not on an APFS volume." : {
"localizations" : {
"en" : {
@@ -511,6 +613,40 @@
}
}
},
+ "%@ · %@ · Expires %@" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ · %@ · Expires %@"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$@ · %2$@ · %3$@に期限切れ"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$@ · %2$@ · %3$@ 만료"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$@ · %2$@ · Hết hạn %3$@"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%1$@ · %2$@ · 将于%3$@过期"
+ }
+ }
+ }
+ },
"%@; 8 cores, 16 GB recommended" : {
"localizations" : {
"en" : {
@@ -727,6 +863,74 @@
}
}
},
+ "A Core Bundle can be installed once every required check passes." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "A Core Bundle can be installed once every required check passes."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "必須項目がすべて合格すると、コアバンドルをインストールできます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "모든 필수 검사를 통과하면 코어 번들을 설치할 수 있습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Có thể cài đặt Bundle lõi khi mọi mục kiểm tra bắt buộc đều đạt."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "所有必需检查通过后,即可安装核心 Bundle。"
+ }
+ }
+ }
+ },
+ "A folder named %@ already exists in this location. Enter another name." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "A folder named %@ already exists in this location. Enter another name."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "この場所には %@ という名前のフォルダが既に存在します。別の名前を入力してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "이 위치에 %@(이)라는 이름의 폴더가 이미 있습니다. 다른 이름을 입력하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Vị trí này đã có thư mục tên %@. Hãy nhập tên khác."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "此位置已存在名为 %@ 的文件夹。请输入其他名称。"
+ }
+ }
+ }
+ },
"A folder with this name already exists in this location." : {
"localizations" : {
"en" : {
@@ -829,6 +1033,40 @@
}
}
},
+ "Add a GitHub token to download builds from GitHub Actions." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Add a GitHub token to download builds from GitHub Actions."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions からビルドをダウンロードするには、GitHub トークンを追加してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions에서 빌드를 다운로드하려면 GitHub 토큰을 추가하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Thêm token GitHub để tải bản dựng từ GitHub Actions."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "添加 GitHub 令牌即可从 GitHub Actions 下载构建版本。"
+ }
+ }
+ }
+ },
"Add execution policy exception" : {
"localizations" : {
"en" : {
@@ -1067,6 +1305,40 @@
}
}
},
+ "An install is in progress. Follow it in the inspector." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "An install is in progress. Follow it in the inspector."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "インストール中です。進行状況はインスペクタで確認できます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "설치가 진행 중입니다. 속성 패널에서 진행 상황을 확인하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đang cài đặt. Hãy theo dõi trong bảng kiểm tra."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "正在安装。可在检查器中查看进度。"
+ }
+ }
+ }
+ },
"Apple silicon" : {
"localizations" : {
"en" : {
@@ -1237,6 +1509,40 @@
}
}
},
+ "Builds from the package workflow, kept by GitHub for 7 days. Downloading them needs a token that can read Actions for Lakr233/vphone-cli. It is stored in your keychain." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Builds from the package workflow, kept by GitHub for 7 days. Downloading them needs a token that can read Actions for Lakr233/vphone-cli. It is stored in your keychain."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "パッケージワークフローのビルドで、GitHub に 7 日間保持されます。ダウンロードには、Lakr233/vphone-cli の Actions を読み取れるトークンが必要です。トークンはキーチェーンに保存されます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "패키지 워크플로의 빌드로, GitHub에 7일간 보관됩니다. 다운로드하려면 Lakr233/vphone-cli의 Actions를 읽을 수 있는 토큰이 필요합니다. 토큰은 키체인에 저장됩니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Các bản dựng từ quy trình đóng gói, được GitHub lưu giữ trong 7 ngày. Để tải xuống, cần token có quyền đọc Actions của Lakr233/vphone-cli. Token được lưu trong chuỗi khóa của bạn."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "来自打包工作流程的构建版本,GitHub 会保留 7 天。下载需要一个可读取 Lakr233/vphone-cli 的 Actions 的令牌,令牌存储在你的钥匙串中。"
+ }
+ }
+ }
+ },
"Cancel" : {
"localizations" : {
"en" : {
@@ -1543,24 +1849,92 @@
}
}
},
- "Choose" : {
+ "Checks failed" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Choose"
+ "value" : "Checks failed"
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
- "value" : "選択"
+ "value" : "チェックに不合格"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "선택"
+ "value" : "검사 실패"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Kiểm tra không đạt"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "检查未通过"
+ }
+ }
+ }
+ },
+ "Checks skipped" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Checks skipped"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "チェックをスキップ済み"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "검사 건너뜀"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đã bỏ qua kiểm tra"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "已跳过检查"
+ }
+ }
+ }
+ },
+ "Choose" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Choose"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "選択"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "선택"
}
},
"vi" : {
@@ -1645,6 +2019,40 @@
}
}
},
+ "Choose a VPhone.bundle folder or a .zip that contains one." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Choose a VPhone.bundle folder or a .zip that contains one."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "VPhone.bundle フォルダ、またはそれを含む .zip を選択してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "VPhone.bundle 폴더 또는 이를 포함하는 .zip을 선택하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Hãy chọn thư mục VPhone.bundle hoặc tệp .zip chứa nó."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "选择 VPhone.bundle 文件夹或包含它的 .zip。"
+ }
+ }
+ }
+ },
"Choose Location…" : {
"localizations" : {
"en" : {
@@ -2121,6 +2529,74 @@
}
}
},
+ "Continue" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Continue"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "続ける"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "계속"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Tiếp tục"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "继续"
+ }
+ }
+ }
+ },
+ "Continue without this check. The bundle’s own preflight still runs." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Continue without this check. The bundle’s own preflight still runs."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "このチェックなしで続行します。バンドル自体の事前チェックは引き続き実行されます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "이 검사 없이 계속합니다. 번들 자체의 사전 점검은 계속 실행됩니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Tiếp tục mà không có mục kiểm tra này. Bundle vẫn chạy kiểm tra trước của riêng nó."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "不经此项检查继续。bundle 自身的预检仍会运行。"
+ }
+ }
+ }
+ },
"Copy Command" : {
"localizations" : {
"en" : {
@@ -2223,6 +2699,74 @@
}
}
},
+ "Core Bundle Install" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Core Bundle Install"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "コアバンドルのインストール"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "코어 번들 설치"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Cài đặt Bundle lõi"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "核心 Bundle 安装"
+ }
+ }
+ }
+ },
+ "Core Bundle…" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Core Bundle…"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "コアバンドル…"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "코어 번들…"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bundle lõi…"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "核心 Bundle…"
+ }
+ }
+ }
+ },
"CPU" : {
"localizations" : {
"en" : {
@@ -3119,6 +3663,74 @@
}
}
},
+ "Done" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Done"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "完了"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "완료"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Xong"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "完成"
+ }
+ }
+ }
+ },
+ "Don’t Skip" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Don’t Skip"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "スキップしない"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "건너뛰지 않음"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Không bỏ qua"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "不跳过"
+ }
+ }
+ }
+ },
"Download" : {
"localizations" : {
"en" : {
@@ -3289,6 +3901,40 @@
}
}
},
+ "Every release is installed." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Every release is installed."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "すべてのリリースがインストール済みです。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "모든 릴리스가 설치되어 있습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đã cài đặt mọi bản phát hành."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "所有发行版均已安装。"
+ }
+ }
+ }
+ },
"Exit status %d" : {
"localizations" : {
"en" : {
@@ -3663,6 +4309,74 @@
}
}
},
+ "GitHub Actions" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions"
+ }
+ }
+ }
+ },
+ "GitHub Actions build · Installed %@ · SHA-256 %@" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions build · Installed %@ · SHA-256 %@"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions ビルド · %1$@ にインストール · SHA-256 %2$@"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions 빌드 · %1$@에 설치됨 · SHA-256 %2$@"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bản dựng GitHub Actions · Cài đặt %1$@ · SHA-256 %2$@"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions 构建版本 · 安装于 %1$@ · SHA-256 %2$@"
+ }
+ }
+ }
+ },
"GitHub answered the release list with an error." : {
"localizations" : {
"en" : {
@@ -3697,6 +4411,74 @@
}
}
},
+ "GitHub refused the token. Check that it can read Actions for Lakr233/vphone-cli." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub refused the token. Check that it can read Actions for Lakr233/vphone-cli."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub がトークンを拒否しました。Lakr233/vphone-cli の Actions を読み取れるか確認してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub가 토큰을 거부했습니다. Lakr233/vphone-cli의 Actions를 읽을 수 있는지 확인하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub đã từ chối token. Hãy kiểm tra token có quyền đọc Actions của Lakr233/vphone-cli."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub 拒绝了此令牌。请确认它可以读取 Lakr233/vphone-cli 的 Actions。"
+ }
+ }
+ }
+ },
+ "GitHub Token" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Token"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Token"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Token"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Token"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Token"
+ }
+ }
+ }
+ },
"Hardware" : {
"localizations" : {
"en" : {
@@ -3765,6 +4547,40 @@
}
}
},
+ "Hide the install steps" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Hide the install steps"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "インストール手順を隠す"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "설치 단계 가리기"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Ẩn các bước cài đặt"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "隐藏安装步骤"
+ }
+ }
+ }
+ },
"Host only" : {
"localizations" : {
"en" : {
@@ -3867,6 +4683,40 @@
}
}
},
+ "Host preflight failed. Fix the issue and retry, or skip to use this version anyway." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Host preflight failed. Fix the issue and retry, or skip to use this version anyway."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "ホストの事前チェックに合格しませんでした。問題を解決して再試行するか、スキップしてこのバージョンをそのまま使用してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "호스트 사전 점검에 실패했습니다. 문제를 해결한 후 다시 시도하거나, 건너뛰고 이 버전을 그대로 사용하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Kiểm tra trước máy chủ không đạt. Hãy khắc phục sự cố rồi thử lại, hoặc bỏ qua để vẫn dùng phiên bản này."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "主机预检未通过。请修复问题后重试,或跳过以继续使用此版本。"
+ }
+ }
+ }
+ },
"Host preflight failed. Fix the issue below, then choose Run Preflight Again." : {
"localizations" : {
"en" : {
@@ -3935,6 +4785,40 @@
}
}
},
+ "Host Setup…" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Host Setup…"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "ホスト設定…"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "호스트 설정…"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Thiết lập máy chủ…"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "主机设置…"
+ }
+ }
+ }
+ },
"Identity" : {
"localizations" : {
"en" : {
@@ -4054,257 +4938,427 @@
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "머신 가져오기"
+ "value" : "머신 가져오기"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nhập máy ảo"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "导入虚拟机"
+ }
+ }
+ }
+ },
+ "Import…" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Import…"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "読み込む…"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "가져오기…"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nhập…"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "导入…"
+ }
+ }
+ }
+ },
+ "Importing %@" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Importing %@"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ を読み込み中"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ 가져오는 중"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đang nhập %@"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "正在导入 %@"
+ }
+ }
+ }
+ },
+ "In use" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "In use"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "使用中"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "사용 중"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đang dùng"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "正在使用"
+ }
+ }
+ }
+ },
+ "Include the restore IPSW directory" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Include the restore IPSW directory"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "復元用 IPSW ディレクトリを含める"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "복원용 IPSW 디렉터리 포함"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bao gồm thư mục IPSW khôi phục"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "包含恢复用的 IPSW 目录"
+ }
+ }
+ }
+ },
+ "Inspector" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Inspector"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "インスペクタ"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "속성 패널"
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Nhập máy ảo"
+ "value" : "Bảng kiểm tra"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "导入虚拟机"
+ "value" : "检查器"
}
}
}
},
- "Import…" : {
+ "Install" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Import…"
+ "value" : "Install"
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
- "value" : "読み込む…"
+ "value" : "インストール"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "가져오기…"
+ "value" : "설치"
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Nhập…"
+ "value" : "Cài đặt"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "导入…"
+ "value" : "安装"
}
}
}
},
- "Importing %@" : {
+ "Install a VPhone.bundle folder or .zip built on this Mac." : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Importing %@"
+ "value" : "Install a VPhone.bundle folder or .zip built on this Mac."
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%@ を読み込み中"
+ "value" : "この Mac でビルドした VPhone.bundle フォルダまたは .zip をインストールします。"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "%@ 가져오는 중"
+ "value" : "이 Mac에서 빌드한 VPhone.bundle 폴더 또는 .zip을 설치합니다."
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Đang nhập %@"
+ "value" : "Cài đặt thư mục VPhone.bundle hoặc tệp .zip được dựng trên máy Mac này."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "正在导入 %@"
+ "value" : "安装在此 Mac 上构建的 VPhone.bundle 文件夹或 .zip。"
}
}
}
},
- "In use" : {
+ "Install a VPhone.bundle to create and run machines." : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "In use"
+ "value" : "Install a VPhone.bundle to create and run machines."
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
- "value" : "使用中"
+ "value" : "マシンを作成して実行するには、VPhone.bundle をインストールしてください。"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "사용 중"
+ "value" : "머신을 생성하고 실행하려면 VPhone.bundle을 설치하십시오."
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Đang dùng"
+ "value" : "Cài đặt VPhone.bundle để tạo và chạy máy ảo."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "正在使用"
+ "value" : "安装 VPhone.bundle 以创建和运行虚拟机。"
}
}
}
},
- "Include the restore IPSW directory" : {
+ "Install as root" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Include the restore IPSW directory"
+ "value" : "Install as root"
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
- "value" : "復元用 IPSW ディレクトリを含める"
+ "value" : "root としてインストール"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "복원용 IPSW 디렉터리 포함"
+ "value" : "root 권한으로 설치"
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Bao gồm thư mục IPSW khôi phục"
+ "value" : "Cài đặt với quyền root"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "包含恢复用的 IPSW 目录"
+ "value" : "以 root 身份安装"
}
}
}
},
- "Inspector" : {
+ "Install CFW" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Inspector"
+ "value" : "Install CFW"
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
- "value" : "インスペクタ"
+ "value" : "CFW をインストール"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "속성 패널"
+ "value" : "CFW 설치"
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Bảng kiểm tra"
+ "value" : "Cài đặt CFW"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "检查器"
+ "value" : "安装 CFW"
}
}
}
},
- "Install as root" : {
+ "Install Local Build" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Install as root"
+ "value" : "Install Local Build"
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
- "value" : "root としてインストール"
+ "value" : "ローカルビルドをインストール"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "root 권한으로 설치"
+ "value" : "로컬 빌드 설치"
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Cài đặt với quyền root"
+ "value" : "Cài đặt bản dựng cục bộ"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "以 root 身份安装"
+ "value" : "安装本地构建版本"
}
}
}
},
- "Install CFW" : {
+ "Install Local Build…" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Install CFW"
+ "value" : "Install Local Build…"
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CFW をインストール"
+ "value" : "ローカルビルドをインストール…"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "CFW 설치"
+ "value" : "로컬 빌드 설치…"
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Cài đặt CFW"
+ "value" : "Cài đặt bản dựng cục bộ…"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "安装 CFW"
+ "value" : "安装本地构建版本…"
}
}
}
@@ -4479,6 +5533,40 @@
}
}
},
+ "Installing…" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Installing…"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "インストール中…"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "설치 중…"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đang cài đặt…"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "正在安装…"
+ }
+ }
+ }
+ },
"Intel Macs are not supported" : {
"localizations" : {
"en" : {
@@ -4615,6 +5703,40 @@
}
}
},
+ "Its Info.plist must have the bundle identifier %@ and a version." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Its Info.plist must have the bundle identifier %@ and a version."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Info.plist にはバンドル識別子 %@ とバージョンが必要です。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Info.plist에 번들 식별자 %@ 및 버전이 있어야 합니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Info.plist của nó phải có mã định danh bundle %@ và phiên bản."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "其 Info.plist 必须包含 bundle 标识符 %@ 和版本号。"
+ }
+ }
+ }
+ },
"Keep the prepared restore tree" : {
"localizations" : {
"en" : {
@@ -4683,6 +5805,40 @@
}
}
},
+ "Launchpad quit before the install finished. Retry to continue." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Launchpad quit before the install finished. Retry to continue."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "インストールが完了する前に Launchpad が終了しました。再試行して続行してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "설치가 완료되기 전에 Launchpad가 종료되었습니다. 계속하려면 다시 시도하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Launchpad đã thoát trước khi cài đặt xong. Hãy thử lại để tiếp tục."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Launchpad 在安装完成前退出。请重试以继续。"
+ }
+ }
+ }
+ },
"Letters, digits, dots, dashes and underscores." : {
"localizations" : {
"en" : {
@@ -4887,6 +6043,40 @@
}
}
},
+ "Local build · Installed %@ · SHA-256 %@" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Local build · Installed %@ · SHA-256 %@"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "ローカルビルド · %1$@ にインストール · SHA-256 %2$@"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "로컬 빌드 · %1$@에 설치됨 · SHA-256 %2$@"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bản dựng cục bộ · Cài đặt %1$@ · SHA-256 %2$@"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "本地构建版本 · 安装于 %1$@ · SHA-256 %2$@"
+ }
+ }
+ }
+ },
"Location" : {
"localizations" : {
"en" : {
@@ -5465,6 +6655,40 @@
}
}
},
+ "No Core Bundle" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "No Core Bundle"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "コアバンドルがありません"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "코어 번들 없음"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Chưa có Bundle lõi"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "没有核心 Bundle"
+ }
+ }
+ }
+ },
"No core bundle is active." : {
"localizations" : {
"en" : {
@@ -5533,6 +6757,40 @@
}
}
},
+ "No GitHub Actions builds are available." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "No GitHub Actions builds are available."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "利用可能な GitHub Actions ビルドがありません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "사용 가능한 GitHub Actions 빌드가 없습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Không có bản dựng GitHub Actions nào."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "没有可用的 GitHub Actions 构建版本。"
+ }
+ }
+ }
+ },
"No Machines" : {
"localizations" : {
"en" : {
@@ -5635,6 +6893,40 @@
}
}
},
+ "No policy exception." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "No policy exception."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "ポリシーの例外はありません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "정책 예외가 없습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Không có ngoại lệ chính sách."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "无策略例外。"
+ }
+ }
+ }
+ },
"No Selection" : {
"localizations" : {
"en" : {
@@ -5805,6 +7097,40 @@
}
}
},
+ "Not checked" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Not checked"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "未チェック"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "확인 안 됨"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Chưa kiểm tra"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "未检查"
+ }
+ }
+ }
+ },
"Not installed" : {
"localizations" : {
"en" : {
@@ -6043,6 +7369,40 @@
}
}
},
+ "Open the workflow run on GitHub" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Open the workflow run on GitHub"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub でワークフローの実行を開く"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub에서 워크플로 실행 열기"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Mở lần chạy quy trình trên GitHub"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "在 GitHub 上打开工作流程运行"
+ }
+ }
+ }
+ },
"Options" : {
"localizations" : {
"en" : {
@@ -6281,6 +7641,40 @@
}
}
},
+ "Policy exception added." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Policy exception added."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "ポリシーの例外を追加しました。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "정책 예외가 추가되었습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đã thêm ngoại lệ chính sách."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "已添加策略例外。"
+ }
+ }
+ }
+ },
"Pre-release" : {
"localizations" : {
"en" : {
@@ -6417,6 +7811,74 @@
}
}
},
+ "Preflight skipped" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Preflight skipped"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "事前チェックをスキップ済み"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "사전 점검 건너뜀"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đã bỏ qua kiểm tra trước"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "已跳过预检"
+ }
+ }
+ }
+ },
+ "Prepare bundle" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Prepare bundle"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "バンドルを準備"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "번들 준비"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Chuẩn bị bundle"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "准备 bundle"
+ }
+ }
+ }
+ },
"Privileged helper" : {
"localizations" : {
"en" : {
@@ -6689,6 +8151,74 @@
}
}
},
+ "Releases" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Releases"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "リリース"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "릴리스"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bản phát hành"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "发行版"
+ }
+ }
+ }
+ },
+ "Reload releases and builds, and run host preflight again." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Reload releases and builds, and run host preflight again."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "リリースとビルドを再読み込みし、ホストの事前チェックを再実行します。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "릴리스와 빌드를 다시 불러오고 호스트 사전 점검을 다시 실행합니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Tải lại các bản phát hành và bản dựng, rồi chạy lại kiểm tra trước máy chủ."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "重新载入发行版和构建版本,并再次运行主机预检。"
+ }
+ }
+ }
+ },
"Reload releases and run host preflight again." : {
"localizations" : {
"en" : {
@@ -7063,6 +8593,40 @@
}
}
},
+ "Require Preflight" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Require Preflight"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "事前チェックを必須にする"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "사전 점검 요구"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Yêu cầu kiểm tra trước"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "要求预检"
+ }
+ }
+ }
+ },
"Required" : {
"localizations" : {
"en" : {
@@ -7176,25 +8740,59 @@
"ja" : {
"stringUnit" : {
"state" : "translated",
- "value" : "システムにより制限されています"
+ "value" : "システムにより制限されています"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "시스템에 의해 제한됨"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bị hệ thống hạn chế"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "受系统限制"
+ }
+ }
+ }
+ },
+ "Retry" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Retry"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "再試行"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "시스템에 의해 제한됨"
+ "value" : "다시 시도"
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Bị hệ thống hạn chế"
+ "value" : "Thử lại"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "受系统限制"
+ "value" : "重试"
}
}
}
@@ -7471,6 +9069,40 @@
}
}
},
+ "Saved in the keychain" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Saved in the keychain"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "キーチェーンに保存済み"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "키체인에 저장됨"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đã lưu trong chuỗi khóa"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "已存储在钥匙串中"
+ }
+ }
+ }
+ },
"Saving settings" : {
"localizations" : {
"en" : {
@@ -7607,6 +9239,40 @@
}
}
},
+ "Set Up…" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Set Up…"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "セットアップ…"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "설정 시작…"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Thiết lập…"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "开始设置…"
+ }
+ }
+ }
+ },
"Set VPHONE_LAUNCHPAD_TEAM, rebuild, and sign the app before installing the helper." : {
"localizations" : {
"en" : {
@@ -7811,6 +9477,142 @@
}
}
},
+ "Show the install steps" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Show the install steps"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "インストール手順を表示"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "설치 단계 보기"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Hiện các bước cài đặt"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "显示安装步骤"
+ }
+ }
+ }
+ },
+ "Skip" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Skip"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "スキップ"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "건너뛰기"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bỏ qua bước"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "跳过"
+ }
+ }
+ }
+ },
+ "Skipped" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Skipped"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "スキップ済み"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "건너뜀"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đã bỏ qua"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "已跳过"
+ }
+ }
+ }
+ },
+ "Skipped · %@" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Skipped · %@"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "スキップ済み · %@"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "건너뜀 · %@"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Đã bỏ qua · %@"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "已跳过 · %@"
+ }
+ }
+ }
+ },
"Source" : {
"localizations" : {
"en" : {
@@ -8389,6 +10191,74 @@
}
}
},
+ "Stored in %@, owned by root and written only by the helper." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Stored in %@, owned by root and written only by the helper."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ に保存されます。所有者は root で、ヘルパーのみが書き込みます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@에 저장되며, root가 소유하고 도우미만 기록합니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Được lưu trong %@, thuộc sở hữu của root và chỉ trình trợ giúp được ghi."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "存储在 %@ 中,所有者为 root,仅由辅助工具写入。"
+ }
+ }
+ }
+ },
+ "The artifact does not contain a VPhone bundle zip." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "The artifact does not contain a VPhone bundle zip."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "アーティファクトに VPhone バンドルの zip が含まれていません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "아티팩트에 VPhone 번들 zip이 없습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Artifact không chứa tệp zip của bundle VPhone."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "此构建产物不包含 VPhone bundle 的 zip 文件。"
+ }
+ }
+ }
+ },
"The clone boots as a new device. SEP storage is copied as is, so a restored machine may need restoring again." : {
"localizations" : {
"en" : {
@@ -8831,6 +10701,40 @@
}
}
},
+ "The installed helper did not match the copy in this app. Try again." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "The installed helper did not match the copy in this app. Try again."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "インストールされたヘルパーがこの App 内のコピーと一致しませんでした。もう一度お試しください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "설치된 도우미가 이 앱에 포함된 사본과 일치하지 않습니다. 다시 시도하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Trình trợ giúp đã cài không khớp với bản trong ứng dụng này. Hãy thử lại."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "已安装的辅助工具与此 App 中的副本不一致。请重试。"
+ }
+ }
+ }
+ },
"The machine did not enter DFU mode within 30 seconds." : {
"localizations" : {
"en" : {
@@ -9171,6 +11075,40 @@
}
}
},
+ "This build has expired on GitHub. Choose a newer one." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "This build has expired on GitHub. Choose a newer one."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "このビルドは GitHub 上で期限切れです。より新しいビルドを選択してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "이 빌드는 GitHub에서 만료되었습니다. 더 최신 빌드를 선택하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bản dựng này đã hết hạn trên GitHub. Hãy chọn bản mới hơn."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "此构建版本已在 GitHub 上过期。请选择更新的构建版本。"
+ }
+ }
+ }
+ },
"This build has no signing team." : {
"localizations" : {
"en" : {
@@ -9613,6 +11551,40 @@
}
}
},
+ "Unable to load GitHub Actions builds. Try again later." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Unable to load GitHub Actions builds. Try again later."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions のビルドを読み込めません。しばらくしてからもう一度お試しください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "GitHub Actions 빌드를 불러올 수 없습니다. 나중에 다시 시도하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Không thể tải các bản dựng GitHub Actions. Hãy thử lại sau."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "无法载入 GitHub Actions 构建版本。请稍后重试。"
+ }
+ }
+ }
+ },
"Unable to load releases from GitHub. Try again later." : {
"localizations" : {
"en" : {
@@ -9681,6 +11653,40 @@
}
}
},
+ "Unable to read the local build." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Unable to read the local build."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "ローカルビルドを読み取れません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "로컬 빌드를 읽을 수 없습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Không thể đọc bản dựng cục bộ."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "无法读取本地构建版本。"
+ }
+ }
+ }
+ },
"Unable to Remove VPhone.bundle %@" : {
"localizations" : {
"en" : {
@@ -9749,6 +11755,40 @@
}
}
},
+ "Unable to save the token in the keychain." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Unable to save the token in the keychain."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "トークンをキーチェーンに保存できません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "토큰을 키체인에 저장할 수 없습니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Không thể lưu token vào chuỗi khóa."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "无法将令牌存储到钥匙串中。"
+ }
+ }
+ }
+ },
"Unable to Start %@" : {
"localizations" : {
"en" : {
@@ -9851,6 +11891,40 @@
}
}
},
+ "Update the privileged helper in Host Setup, then run preflight again." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Update the privileged helper in Host Setup, then run preflight again."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "「ホスト設定」で特権ヘルパーをアップデートしてから、事前チェックを再実行してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "호스트 설정에서 권한 있는 도우미를 업데이트한 후 사전 점검을 다시 실행하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Hãy cập nhật trình trợ giúp đặc quyền trong Thiết lập máy chủ, rồi chạy lại kiểm tra trước."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "请在“主机设置”中更新特权辅助工具,然后再次运行预检。"
+ }
+ }
+ }
+ },
"Update…" : {
"localizations" : {
"en" : {
@@ -10021,6 +12095,74 @@
}
}
},
+ "Use this version without the failed checks." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Use this version without the failed checks."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "不合格のチェックを無視してこのバージョンを使用します。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "실패한 검사를 무시하고 이 버전을 사용합니다."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Dùng phiên bản này mà không cần các mục kiểm tra không đạt."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "忽略未通过的检查,使用此版本。"
+ }
+ }
+ }
+ },
+ "Use Without Preflight" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Use Without Preflight"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "事前チェックなしで使用"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "사전 점검 없이 사용"
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Dùng mà không kiểm tra trước"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "不经预检直接使用"
+ }
+ }
+ }
+ },
"Variant" : {
"localizations" : {
"en" : {
@@ -10225,6 +12367,40 @@
}
}
},
+ "VPhone.bundle %@ is not supported. Use version %@ or newer." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "VPhone.bundle %@ is not supported. Use version %@ or newer."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "VPhone.bundle %1$@ は非対応です。%2$@ 以降を使用してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "VPhone.bundle %1$@은(는) 지원되지 않습니다. %2$@ 이상을 사용하세요."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "VPhone.bundle %1$@ không được hỗ trợ. Hãy dùng phiên bản %2$@ trở lên."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "不支持 VPhone.bundle %1$@。请使用 %2$@ 或更新版本。"
+ }
+ }
+ }
+ },
"vphoned did not answer within 300 seconds." : {
"localizations" : {
"en" : {
@@ -10496,6 +12672,40 @@
}
}
}
+ },
+ "Zip the bundle with `ditto -c -k --keepParent VPhone.bundle VPhone.zip`, or choose the VPhone.bundle folder." : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Zip the bundle with `ditto -c -k --keepParent VPhone.bundle VPhone.zip`, or choose the VPhone.bundle folder."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "`ditto -c -k --keepParent VPhone.bundle VPhone.zip` でバンドルを zip に圧縮するか、VPhone.bundle フォルダを選択してください。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "`ditto -c -k --keepParent VPhone.bundle VPhone.zip`로 번들을 압축하거나 VPhone.bundle 폴더를 선택하십시오."
+ }
+ },
+ "vi" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Hãy nén bundle bằng `ditto -c -k --keepParent VPhone.bundle VPhone.zip`, hoặc chọn thư mục VPhone.bundle."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "请使用 `ditto -c -k --keepParent VPhone.bundle VPhone.zip` 压缩 bundle,或选择 VPhone.bundle 文件夹。"
+ }
+ }
+ }
}
},
"version" : "1.0"
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift
index 08fc3c3d..af473faa 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift
@@ -38,6 +38,8 @@ struct VPhoneLaunchpadMachineInspector: View {
var body: some View {
Form {
+ VPhoneLaunchpadInstallSection()
+
Section {
if let creation = library.creations[machine.path] {
creationSummary(creation)
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift
index a97ee226..681dcfb8 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift
@@ -29,7 +29,6 @@ struct VPhoneLaunchpadMachinesView: View {
@Environment(VPhoneLaunchpadModel.self) private var model
@State private var sheet: Sheet?
@State private var deletion: MachinePath?
- @State private var showsInspector = true
private var library: VPhoneLaunchpadMachineLibrary {
model.machines
@@ -37,6 +36,7 @@ struct VPhoneLaunchpadMachinesView: View {
var body: some View {
@Bindable var library = library
+ @Bindable var model = model
Group {
if library.machines.isEmpty {
emptyState
@@ -44,7 +44,7 @@ struct VPhoneLaunchpadMachinesView: View {
table(selection: $library.selection)
}
}
- .inspector(isPresented: $showsInspector) {
+ .inspector(isPresented: $model.showsInspector) {
Group {
if let machine = library.selected {
VPhoneLaunchpadMachineInspector(
@@ -52,6 +52,11 @@ struct VPhoneLaunchpadMachinesView: View {
onShowProgress: { path in sheet = .creation(path) },
onOpenConsole: { path in sheet = .console(path) },
)
+ } else if model.bundles.progress != nil {
+ Form {
+ VPhoneLaunchpadInstallSection()
+ }
+ .formStyle(.grouped)
} else {
ContentUnavailableView("No Selection", systemImage: "iphone")
}
@@ -136,22 +141,34 @@ struct VPhoneLaunchpadMachinesView: View {
Label("Import", systemImage: "square.and.arrow.down")
}
.help("Import an exported machine")
- .disabled(library.globalActivity != nil)
+ .disabled(library.globalActivity != nil || model.bundles.activeVersion == nil)
Button {
sheet = .newMachine
} label: {
Label("New Machine", systemImage: "plus")
}
.help("Create a machine")
- Button {
- showsInspector.toggle()
- } label: {
- Label("Inspector", systemImage: "sidebar.trailing")
- }
- .help(showsInspector ? "Hide the inspector" : "Show the inspector")
+ .disabled(model.bundles.activeVersion == nil)
+ }
+ // Primary actions sit at the leading edge on macOS; the space pushes
+ // the inspector toggle to the trailing edge, above the inspector.
+ ToolbarItem(placement: .automatic) {
+ Spacer()
+ }
+ ToolbarItem(placement: .automatic) {
+ inspectorToggle
}
}
+ private var inspectorToggle: some View {
+ Button {
+ model.showsInspector.toggle()
+ } label: {
+ Label("Inspector", systemImage: "sidebar.trailing")
+ }
+ .help(model.showsInspector ? "Hide the inspector" : "Show the inspector")
+ }
+
/// The same actions in the toolbar menu and the table's context menu.
@ViewBuilder
private func machineActions(_ machine: VPhoneLaunchpadMachine?) -> some View {
@@ -227,15 +244,27 @@ struct VPhoneLaunchpadMachinesView: View {
}
}
+ @ViewBuilder
private var emptyState: some View {
- ContentUnavailableView {
- Label("No Machines", systemImage: "iphone")
- } description: {
- Text(library.listError ?? String(localized: "Machines in \(VPhoneLaunchpadHostSetup.abbreviated(URL(fileURLWithPath: library.libraryRoot, isDirectory: true))) appear here."))
- } actions: {
- Button("New Machine…") { sheet = .newMachine }
- .buttonStyle(.borderedProminent)
- Button("Import…") { chooseImport() }
+ if model.bundles.activeVersion == nil {
+ ContentUnavailableView {
+ Label("No Core Bundle", systemImage: "shippingbox")
+ } description: {
+ Text("Install a VPhone.bundle to create and run machines.")
+ } actions: {
+ Button("Set Up…") { model.panel = model.host.requiredPassed ? .coreBundle : .hostSetup }
+ .buttonStyle(.borderedProminent)
+ }
+ } else {
+ ContentUnavailableView {
+ Label("No Machines", systemImage: "iphone")
+ } description: {
+ Text(library.listError ?? String(localized: "Machines in \(VPhoneLaunchpadHostSetup.abbreviated(URL(fileURLWithPath: library.libraryRoot, isDirectory: true))) appear here."))
+ } actions: {
+ Button("New Machine…") { sheet = .newMachine }
+ .buttonStyle(.borderedProminent)
+ Button("Import…") { chooseImport() }
+ }
}
}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift
index d4ba9000..e70d7d9d 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift
@@ -40,24 +40,35 @@ struct VPhoneLaunchpadNewMachineView: View {
return selectedPairing.map { ($0.ios.url, $0.recommendedCloudOS.url) }
}
+ /// Used when the name field is left empty. It is refused only when a
+ /// machine or folder of that name already exists.
+ private static let defaultName = "research-01"
+
+ private var effectiveName: String {
+ let name = name.trimmingCharacters(in: .whitespaces)
+ return name.isEmpty ? Self.defaultName : name
+ }
+
private var machine: VPhoneLaunchpadMachinePath {
- VPhoneLaunchpadMachinePath(libraryRoot: location, name: name)
+ VPhoneLaunchpadMachinePath(libraryRoot: location, name: effectiveName)
}
private var nameProblem: String? {
- if name.isEmpty {
- return nil
- }
- if !VPhoneLaunchpadNames.isValidMachineName(name) {
+ let isDefault = name.trimmingCharacters(in: .whitespaces).isEmpty
+ if !VPhoneLaunchpadNames.isValidMachineName(effectiveName) {
return String(localized: "Use letters, digits, dots, dashes and underscores.")
}
if model.machines.machines.contains(where: { $0.path == machine }) || model.machines.creations[machine]?.isRunning == true {
- return String(localized: "A machine with this name already exists.")
+ return isDefault
+ ? String(localized: "\(Self.defaultName) already exists. Enter another name.")
+ : String(localized: "A machine with this name already exists.")
}
if FileManager.default.fileExists(atPath: machine.url.path) {
- return String(localized: "A folder with this name already exists in this location.")
+ return isDefault
+ ? String(localized: "A folder named \(Self.defaultName) already exists in this location. Enter another name.")
+ : String(localized: "A folder with this name already exists in this location.")
}
- if !VPhoneLaunchpadMachineLocations.socketPathFits(root: location, name: name) {
+ if !VPhoneLaunchpadMachineLocations.socketPathFits(root: location, name: effectiveName) {
return String(localized: "The path is too long. Use a shorter name, or a location with a shorter path.")
}
return nil
@@ -68,13 +79,13 @@ struct VPhoneLaunchpadNewMachineView: View {
}
private var canCreate: Bool {
- !name.isEmpty && nameProblem == nil && locationProblem == nil && sources != nil
+ nameProblem == nil && locationProblem == nil && sources != nil
}
var body: some View {
Form {
Section {
- TextField("Name", text: $name, prompt: Text(verbatim: "research-01"))
+ TextField("Name", text: $name, prompt: Text(verbatim: Self.defaultName))
locationPicker
} footer: {
if let problem = nameProblem ?? locationProblem {
@@ -276,7 +287,7 @@ struct VPhoneLaunchpadNewMachineView: View {
return
}
let options = VPhoneLaunchpadCreationPipeline.Options(
- name: name,
+ name: effectiveName,
libraryRoot: location,
iphoneSource: iphone,
cloudOSSource: cloudOS,
diff --git a/VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperBundleInstaller.swift b/VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperBundleInstaller.swift
index 477f7db5..4864e60c 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperBundleInstaller.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperBundleInstaller.swift
@@ -46,7 +46,7 @@ enum VPhoneLaunchpadHelperBundleInstaller {
let info = try PropertyListSerialization.propertyList(from: Data(contentsOf: infoURL), format: nil)
let bundleVersion = (info as? [String: Any])?["CFBundleShortVersionString"] as? String
guard let bundleVersion, VPhoneLaunchpadNames.isCompatibleBundleVersion(bundleVersion),
- version == bundleVersion || version == "\(bundleVersion)-local"
+ VPhoneLaunchpadNames.bundleVersion(of: version) == bundleVersion
else {
throw VPhoneLaunchpadHelperError("VPhone.bundle version does not match \(version). Download it again.")
}
diff --git a/VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadBundleStore.swift b/VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadBundleStore.swift
index 50ad90a6..c7104e48 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadBundleStore.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadBundleStore.swift
@@ -76,10 +76,22 @@ nonisolated enum VPhoneLaunchpadNames {
matches(value, "^[0-9A-Za-z][0-9A-Za-z._-]{0,63}$") && !value.contains("..")
}
+ /// The bundle's own version inside a store name. Builds that are not
+ /// releases carry a suffix: `-local` for one made on this Mac, and
+ /// `-ci.<commit>` for a GitHub Actions artifact.
+ static func bundleVersion(of value: String) -> String {
+ if value.hasSuffix("-local") {
+ return String(value.dropLast("-local".count))
+ }
+ if let suffix = value.range(of: "-ci\\.[0-9a-f]{7,40}$", options: .regularExpression) {
+ return String(value[..<suffix.lowerBound])
+ }
+ return value
+ }
+
static func isCompatibleBundleVersion(_ value: String) -> Bool {
guard isValidVersion(value) else { return false }
- let release = value.hasSuffix("-local") ? String(value.dropLast("-local".count)) : value
- let parts = release.split(separator: ".", omittingEmptySubsequences: false)
+ let parts = bundleVersion(of: value).split(separator: ".", omittingEmptySubsequences: false)
guard parts.count == 3,
let major = Int(parts[0]), let minor = Int(parts[1]), let patch = Int(parts[2])
else { return false }