Run a virtual iPhone on an Apple Silicon Mac.
Swift
deps: resolve capstone by version, and start tracking the lock file
Lakr158a2cb90245
diff --git a/.gitignore b/.gitignoreindex f83d3e12..8e1249e6 100644--- a/.gitignore+++ b/.gitignore@@ -318,6 +318,12 @@ __marimo__/# Streamlit.streamlit/secrets.toml*.resolved+# …except the one that matters. `*.resolved` arrived with the boilerplate above+# and swept up SwiftPM's lock file with it, which left every dependency version+# resolved fresh on each clone — the opposite of what this repository claims+# about reproducing a build. It is an application, not a library, so the lock+# file belongs in the tree.+!Package.resolved/VM/ipsws/.limd/diff --git a/AGENTS.md b/AGENTS.mdindex f02244d5..f994b57d 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -11,8 +11,8 @@ Virtual iPhone boot tool using Apple's Virtualization.framework with PCC researc- **AMFI refuses `vphone-vm`?** `make amfi_command` prints the bypass line for this build. The bypass itself is the user's to install and run; see Key Patterns.- **Restore:** `vphone-cli restore`, in process. Vendored libirecovery + idevicerestore (`sources/MobileRecoveryCore`, `sources/MobileRestoreCore`) over the `AppleMobileDeviceLibrary` xcframeworks. No interpreter, no environment to provision, no setup step. See `research/p2_restore_off_python.md`.- **Platform:** macOS 15+ (Sequoia). `vphone-vm` needs amfid to accept its private entitlements: either SIP off with `amfi_get_out_of_my_way=1`, or SIP on (`--without debug`) plus an allowlist bypass the user runs. Both are in README's "SIP/AMFI Relaxation"; neither is installed by this project.-- **Language:** Swift 6.0 (SwiftPM), private APIs via [Dynamic](https://github.com/mhdhejazi/Dynamic)-- **Dependencies:** seven SwiftPM packages, every one resolved by URL — there is no `vendor/` directory, and `Package.resolved` pins fourteen once transitives are counted. Three git submodules are left: `scripts/resources`, `scripts/repos/trustcache`, `scripts/repos/insert_dylib`. **No Python anywhere.**+- **Language:** Swift 6.0 (SwiftPM), private APIs via [Dynamic](https://github.com/mhdhejazi/Dynamic). This package's own manifest is `swift-tools-version:6.0`, but the **toolchain floor is Swift 6.2**: `libcapstone-spm` declares 6.2 so that it can reach `CSetting.disableWarning` instead of `.unsafeFlags`, which is what lets it be depended on by version at all.+- **Dependencies:** seven SwiftPM packages, every one resolved by URL and **every one by version** — there is no `vendor/` directory, no `branch:` requirement, and `Package.resolved` pins fourteen once transitives are counted. Three git submodules are left: `scripts/resources`, `scripts/repos/trustcache`, `scripts/repos/insert_dylib`. **No Python anywhere.**## Workflow Rulesdiff --git a/Package.resolved b/Package.resolvednew file mode 100644index 00000000..11b8c0bf--- /dev/null+++ b/Package.resolved@@ -0,0 +1,132 @@+{+ "originHash" : "cf27600e414003ad42d307bca61d24d4e4dcfa4d96f55d0778961239b9c96a68",+ "pins" : [+ {+ "identity" : "applemobiledevicelibrary",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/Lakr233/AppleMobileDeviceLibrary.git",+ "state" : {+ "revision" : "98751dcfdd2257afe6529bd8aa688be27743af98",+ "version" : "1.0.1790070576"+ }+ },+ {+ "identity" : "dynamic",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/mhdhejazi/Dynamic.git",+ "state" : {+ "revision" : "ab9a2570862d54aed2663691bb767f881226a12f",+ "version" : "1.2.0"+ }+ },+ {+ "identity" : "libarchive.xcframework",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/Lakr233/libarchive.xcframework.git",+ "state" : {+ "revision" : "3bda868f1868790de2dd246a9eff76eeecba3537",+ "version" : "0.1.1"+ }+ },+ {+ "identity" : "libcapstone-spm",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/Lakr233/libcapstone-spm.git",+ "state" : {+ "revision" : "5d3f53a59fada26884ffc9ab32129288ce1ee48f",+ "version" : "0.1.3"+ }+ },+ {+ "identity" : "libimg4-spm",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/Lakr233/libimg4-spm.git",+ "state" : {+ "revision" : "1ed44d4b370d437135419338bfe85e5610c8cc10",+ "version" : "0.1.1"+ }+ },+ {+ "identity" : "machokit",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/p-x9/MachOKit.git",+ "state" : {+ "revision" : "773e10797abc53914b94c2ee8c6f40f5da0b06eb",+ "version" : "0.52.2"+ }+ },+ {+ "identity" : "objectarchivekit",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/p-x9/ObjectArchiveKit.git",+ "state" : {+ "revision" : "96d782a576273b73b277b577943a2a25b00b919e",+ "version" : "0.5.0"+ }+ },+ {+ "identity" : "openssl-spm",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/Lakr233/openssl-spm.git",+ "state" : {+ "revision" : "9f3b525d960fe71e534482310e96cd9c4f2faa17",+ "version" : "3.6.2"+ }+ },+ {+ "identity" : "swift-argument-parser",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/apple/swift-argument-parser.git",+ "state" : {+ "revision" : "6a52f3251125d74daf04fcbd5e6f08a75d074382",+ "version" : "1.8.2"+ }+ },+ {+ "identity" : "swift-asn1",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/apple/swift-asn1.git",+ "state" : {+ "revision" : "3b6410f7dee09eb33cdd26260c5fd47fda19b0e2",+ "version" : "1.7.3"+ }+ },+ {+ "identity" : "swift-binary-parse-support",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/p-x9/swift-binary-parse-support.git",+ "state" : {+ "revision" : "5fb96b503672ea4752eded6b4e301fd87214b03b",+ "version" : "0.2.1"+ }+ },+ {+ "identity" : "swift-crypto",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/apple/swift-crypto.git",+ "state" : {+ "revision" : "95ba0316a9b733e92bb6b071255ff46263bbe7dc",+ "version" : "3.15.1"+ }+ },+ {+ "identity" : "swift-fileio",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/p-x9/swift-fileio.git",+ "state" : {+ "revision" : "13a83389fb4844f279b43012c4b8d7a3f95773bf",+ "version" : "0.15.1"+ }+ },+ {+ "identity" : "swift-fileio-extra",+ "kind" : "remoteSourceControl",+ "location" : "https://github.com/p-x9/swift-fileio-extra.git",+ "state" : {+ "revision" : "eccf765a9d90b82db55cacd260490d2fcae000fb",+ "version" : "0.3.0"+ }+ }+ ],+ "version" : 3+}diff --git a/Package.swift b/Package.swiftindex 1c12aa73..18d00b5e 100644--- a/Package.swift+++ b/Package.swift@@ -17,12 +17,15 @@ let package = Package(dependencies: [.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.8.2"),.package(url: "https://github.com/mhdhejazi/Dynamic.git", from: "1.2.0"),- // The one that cannot be a version: its CoreCapstone target carries- // `.unsafeFlags(["-Wno-shorten-64-to-32"])`, and SwiftPM refuses unsafe- // flags in a dependency resolved by version — a branch requirement is- // allowed to carry them. Drop that flag upstream and this becomes- // `from:` like the rest.- .package(url: "https://github.com/Lakr233/libcapstone-spm.git", branch: "main"),+ // Was the one that could not be a version, because its CoreCapstone+ // target carried `.unsafeFlags(["-Wno-shorten-64-to-32"])` and SwiftPM+ // refuses unsafe flags in a dependency resolved by version. 0.1.3+ // writes the same flag through `CSetting.disableWarning`, which is not+ // unsafe, so this is `from:` like the rest and `Package.resolved`+ // records a version rather than whatever `main` pointed at that day.+ // Start at 0.1.3 and not lower: 0.1.1 and 0.1.2 tag a commit that is+ // not an ancestor of `main` and does not carry the fix.+ .package(url: "https://github.com/Lakr233/libcapstone-spm.git", from: "0.1.3"),.package(url: "https://github.com/Lakr233/libimg4-spm.git", from: "0.1.1"),.package(url: "https://github.com/Lakr233/libarchive.xcframework.git", from: "0.1.1"),.package(url: "https://github.com/p-x9/MachOKit.git", from: "0.52.2"),