Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Merge remote-tracking branch 'upstream/main' into pr-773

Jackyc124fb7bf30f
diff --cc VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift
index 7e83d6c5,e0178f42..8ee04116
--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift
@@@ -68,8 -68,9 +68,9 @@@ public enum FirmwarePatchSetCatalog
Set(FirmwareKernelFridaPatchSet.manifest.patches.map(\.identifier))
.union(hypervisorConcealmentPatches)
.union(experimentalIdentityPatches)
- .union([FirmwareGuestSystemPatchSet.otaUserland, FirmwareGuestSystemPatchSet.homePodTopCap, FirmwareGuestSystemPatchSet.homePodSetupBypass, FirmwareGuestSystemPatchSet.homePodAudioProduct, FirmwareGuestSystemPatchSet.homePodWelcome, FirmwareGuestSystemPatchSet.homePodSiriSpeech, FirmwareGuestSystemPatchSet.homePodOTAUserland, FirmwareGuestSystemPatchSet.homePodSoundGlow, FirmwareGuestSystemPatchSet.homePodCryptexStaging, FirmwareGuestSystemPatchSet.homePodCryptexClass, FirmwareGuestSystemPatchSet.homePodAdHocInstall])
+ .union([FirmwareGuestSystemPatchSet.otaUserland, FirmwareGuestSystemPatchSet.homePodTopCap, FirmwareGuestSystemPatchSet.homePodSetupBypass, FirmwareGuestSystemPatchSet.homePodAirPlayVM, FirmwareGuestSystemPatchSet.homePodAudioProduct, FirmwareGuestSystemPatchSet.homePodWelcome, FirmwareGuestSystemPatchSet.homePodSiriSpeech, FirmwareGuestSystemPatchSet.homePodOTAUserland, FirmwareGuestSystemPatchSet.homePodSoundGlow, FirmwareGuestSystemPatchSet.homePodCryptexStaging, FirmwareGuestSystemPatchSet.homePodCryptexClass, FirmwareGuestSystemPatchSet.homePodAdHocInstall])
.union([FirmwareKernelCustomFirmwarePatchSet.tvTPROPagers, misTrustAuthPatch, FirmwareGuestSystemPatchSet.settingsRootRows, FirmwareGuestSystemPatchSet.settingsSoftwareUpdate, FirmwareGuestSystemPatchSet.tvTPRO, FirmwareGuestSystemPatchSet.tvOTAUserland, FirmwareGuestSystemPatchSet.tvSetupDisplayLookup, FirmwareGuestSystemPatchSet.tvSetupFocus, FirmwareGuestSystemPatchSet.tvLocalActivation, FirmwareGuestSystemPatchSet.tvLegacySetup])
+ .union([FirmwareGuestSystemPatchSet.prebootFoldableProductId])
/// ProMotion: the 120 Hz timing for the paravirtual display.
///
diff --cc VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareCatalog.swift
index 889e4531,ede13d22..f7006717
--- a/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareCatalog.swift
+++ b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareCatalog.swift
@@@ -687,6 -677,26 +682,27 @@@ public enum VPhoneFirmwareCatalog
}
}
+ /// The cloudOS for `device`'s release at `url`, of `version`: its pairing's,
+ /// else the one the pairings give that version on its family.
+ public static func recommendedCloudOS(forDevice device: String, version: String, url: String) -> VPhoneCloudOSOption {
+ let guest = VPhoneGuestDevice.named(device)
+ let pairings = pairings(for: device)
+ let name = "\((guest?.family ?? .iPhone).osName) \(version)"
+ if let pairing = pairings.first(where: { $0.iosURL == url }) ?? pairings.first(where: { $0.iosName == name }) {
+ return VPhoneCloudOSOption(name: pairing.cloudosName, url: pairing.cloudosURL)
+ }
+ return recommendedCloudOS(for: guest?.family ?? .iPhone, version: version)
+ }
+
+ static func recommendedCloudOS(for family: VPhoneGuestDevice.Family, version: String) -> VPhoneCloudOSOption {
+ switch family {
- case .appleTV, .homePod: VPhoneCloudOSOption(name: "cloudOS 26.4", url: cloud264)
++ case .appleTV: VPhoneCloudOSOption(name: "cloudOS 26.4", url: cloud264)
++ case .homePod: researchBoardCloudOS(forVersion: version) ?? VPhoneCloudOSOption(name: "cloudOS 26.4", url: cloud264)
+ case .watch: researchBoardCloudOS(forVersion: version) ?? recommendedCloudOS(forVersion: version)
+ case .iPhone, .iPad: recommendedCloudOS(forVersion: version)
+ }
+ }
+
/// The cloudOS the iPhone pairings give a release of this version.
static func recommendedCloudOS(forVersion version: String) -> VPhoneCloudOSOption {
switch version.split(separator: ".").prefix(2).joined(separator: ".") {