Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Refuse a cloudOS without vphone600ap before extracting it

Jacky59f6b9bec446
diff --git a/Documents/Guides/compatibility.md b/Documents/Guides/compatibility.md
index 3b1d7420..f9c9d0de 100644
--- a/Documents/Guides/compatibility.md
+++ b/Documents/Guides/compatibility.md
@@ -16,7 +16,20 @@ These are the two iPhone17,3 combinations exercised with the native JB pipeline
| PR #486 | `17,3_26.6.2_23G90` | `26.4-23E5207q` | JB patches, restore, CFW, boot, vphoned ping |
| PR #486 | `17,3_27.0_24A435` | `26.4-23E5207q` | JB patches, restore, CFW, boot, vphoned ping |
-The cloudOS 26.4 image was the latest one **verified to contain `vphone600ap` during that investigation**. This is a dated observation, not a promise that it remains the newest available release. Use `vphone-cli fw catalog` to inspect the current catalogue. Other versions may work, but they have not passed this same end-to-end check.
+The cloudOS 26.4 beta image (`26.4-23E5207q`) is the newest one that contains `vphone600ap`, the identity the guest's kernel, SEP and device tree come from. Every cloudOS release after it was checked on 2026-10-03 and lists only the PCC boards and `vresearch101ap`: `iPhone99,11` is gone from `SupportedProductTypes`, and there is no `kernelcache.*.vphone600`, `sep-firmware.vphone600` or `DeviceTree.vphone600ap`. None of them can boot a guest; `fw prepare` refuses them before extracting anything.
+
+| cloudOS | `vresearch101ap` | `vphone600ap` |
+| --- | --- | --- |
+| `26.4-23E5207q` (beta) | yes | yes |
+| `26.4-23E244` | yes | no |
+| `26.4.1-23E254` | yes | no |
+| `26.5-23F75` | yes | no |
+| `26.5.2-23F83` | yes | no |
+| `26.6-23G71` | yes | no |
+| `26.6.1-23G82` | yes | no |
+| `26.7-23H20` | yes | no |
+
+Use `vphone-cli fw catalog` to inspect the current catalogue. Other iPhone and iPad versions may work with `26.4-23E5207q`, but they have not passed this same end-to-end check.
## iPadOS
diff --git a/VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift b/VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift
index 2bf84f66..05402108 100644
--- a/VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift
+++ b/VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift
@@ -25,6 +25,7 @@ public enum VPhoneIPSWCache {
case swappedSources(iPhone: URL, cloudOS: URL)
case notIPhoneSource(URL, productTypes: [String])
case notCloudOSSource(URL)
+ case noVirtualPhoneInCloudOS(URL, version: String, build: String)
public var errorDescription: String? {
switch self {
@@ -40,6 +41,8 @@ public enum VPhoneIPSWCache {
"\(file.lastPathComponent) is not an IPSW vphone can run; it is for \(productTypes.isEmpty ? "no listed product" : productTypes.joined(separator: ", ")). Choose an IPSW for \(VPhoneIPSWCache.guestProductTypes.joined(separator: " or ")) as the iPhone source."
case let .notCloudOSSource(file):
"\(file.lastPathComponent) is not a cloudOS IPSW: it has no \(VPhoneIPSWCache.cloudOSDeviceClass) build identity. Choose a cloudOS IPSW as the cloudOS source."
+ case let .noVirtualPhoneInCloudOS(file, version, build):
+ "cloudOS \(version) (\(build)) in \(file.lastPathComponent) has no \(VPhoneIPSWCache.guestDeviceClass) build identity to boot the guest from; no cloudOS after the 26.4 beta (23E5207q) has one. Choose the cloudOS `vphone-cli fw catalog` recommends."
}
}
}
@@ -247,6 +250,10 @@ public enum VPhoneIPSWCache {
/// chain matches the VM's DFU hardware. The restore tree needs both.
public static let iPhoneProductType = VPhoneFirmwareCatalog.device
public static let cloudOSDeviceClass = "vresearch101ap"
+ /// The cloudOS device class that supplies the guest's kernel, SEP and
+ /// device tree. No cloudOS after the 26.4 beta (23E5207q) carries it,
+ /// including the 26.4 release (23E244) and every one up to 26.7 (23H20).
+ public static let guestDeviceClass = "vphone600ap"
/// Every product whose IPSW can supply the guest OS: the iPhone17,3 the
/// catalog targets, and the iPads `VPhoneGuestDevice` knows.
@@ -278,6 +285,9 @@ public enum VPhoneIPSWCache {
guard cloudOSIsCloudOS else {
throw Error.notCloudOSSource(cloudOS.file)
}
+ guard cloudOS.deviceClasses.contains(guestDeviceClass) else {
+ throw Error.noVirtualPhoneInCloudOS(cloudOS.file, version: cloudOS.version, build: cloudOS.build)
+ }
}
static func cacheName(for url: URL) -> String {
diff --git a/VPhoneKit/VPhoneArchiveKitTests/IPSWCacheTests.swift b/VPhoneKit/VPhoneArchiveKitTests/IPSWCacheTests.swift
index 6d5fae1c..ec4c83ff 100644
--- a/VPhoneKit/VPhoneArchiveKitTests/IPSWCacheTests.swift
+++ b/VPhoneKit/VPhoneArchiveKitTests/IPSWCacheTests.swift
@@ -213,6 +213,23 @@ struct IPSWCacheTests {
}
}
+ @Test func `a cloudOS without the virtual iPhone is refused before extraction`() throws {
+ let root = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString)
+ try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
+ defer { try? FileManager.default.removeItem(at: root) }
+ let phone = try ipsw(in: root, "phone", productTypes: ["iPhone17,3"], deviceClasses: ["D47AP"])
+ // cloudOS 26.4 (23E244) and later: the PCC boards and vresearch101ap, no vphone600ap.
+ let cloud = try ipsw(in: root, "cloud", productTypes: ["ComputeModule14,1", "Mac14,14"],
+ deviceClasses: ["j226cap", "j236cap", "vresearch101ap"])
+
+ #expect {
+ try VPhoneIPSWCache.checkPair(iPhone: phone, cloudOS: cloud)
+ } throws: { error in
+ guard case .noVirtualPhoneInCloudOS? = error as? VPhoneIPSWCache.Error else { return false }
+ return error.localizedDescription.contains("vphone600ap")
+ }
+ }
+
@Test func `an iPad IPSW the guest device list knows pairs with cloudOS`() throws {
let root = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString)
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
diff --git a/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareCatalog.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareCatalog.swift
index b71908a1..f3f1b869 100644
--- a/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareCatalog.swift
+++ b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareCatalog.swift
@@ -48,6 +48,9 @@ public enum VPhoneFirmwareCatalog {
public static let device = "iPhone17,3"
// cloudOS images (one per major); referenced by multiple iPhone builds.
+ // cloud264 is the 26.4 beta (23E5207q), the last cloudOS with vphone600ap:
+ // every release from 26.4 (23E244) to 26.7 (23H20) has only vresearch101ap,
+ // so newer builds keep pairing with it.
static let cloud261 = "https://updates.cdn-apple.com/private-cloud-compute/399b664dd623358c3de118ffc114e42dcd51c9309e751d43bc949b98f4e31349"
static let cloud262 = "https://updates.cdn-apple.com/private-cloud-compute/0cb00f22e0f7a8b33995b49b2bdca77f781ed6093a09c570ac21b0f012bab908"
static let cloud263 = "https://updates.cdn-apple.com/private-cloud-compute/edc92b58ab7e2f207a6407fd0a0e1a60f7d43bf9d93325bf6d3db3e154ee5525"