Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Name the guest's product type beside its model in New Machine

Jacky9c3b97407bb2
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachine.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachine.swift
index e3e1d194..5236223e 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachine.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachine.swift
@@ -196,6 +196,12 @@ nonisolated struct VPhoneLaunchpadFirmwareCatalog: Decodable, Sendable {
family == "iPad"
}
+ /// The name with its product type, `iPhone 16 (iPhone17,3)`: Launchpad
+ /// showed only the product type before, which reads as iPhone 17.
+ var detailedName: String {
+ name == productType ? name : "\(name) (\(productType))"
+ }
+
/// The newest release, or the newest build when every one is a beta.
var defaultPairing: Pairing? {
pairings.last { !$0.isBeta } ?? pairings.last
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift
index 08a1fa8c..c81dbb58 100644
--- a/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift
@@ -352,7 +352,7 @@ struct VPhoneLaunchpadNewMachineView: View {
Text("Firmware")
} footer: {
if !usesCustomSources, let selectedGuest {
- Text("Recommended firmware pairings for \(selectedGuest.name).")
+ Text("Recommended firmware pairings for \(selectedGuest.detailedName).")
.foregroundStyle(.secondary)
}
}