Run a virtual iPhone on an Apple Silicon Mac.
Swift
Separate VM child signing and finalize Xcode warning cleanup
Lakr2b5853759844
diff --git a/Scripts/check_aux.sh b/Scripts/check_aux.shold mode 100644new mode 100755index 0c181064..d28a6562--- a/Scripts/check_aux.sh+++ b/Scripts/check_aux.sh@@ -9,8 +9,8 @@ resources="$bundle/Contents/Resources"[[ -d "$bundle" ]] || { print -u2 "Missing Xcode app: $bundle"; exit 1; }-for name in vphone-vm vphone-cli VPhoneEscalator vphoned vphoned.signed \- vpregister libcamfix.dylib libvcamcaptured.dylib TweakLoader.dylib \+for name in vphone-app vphone-vm vphone-cli VPhoneEscalator vphoned vphoned.signed \+ vpregister libswiftCompatibilitySpan.vphone.dylib libcamfix.dylib libvcamcaptured.dylib TweakLoader.dylib \libAppleParavirtCompilerPluginIOGPUFamily.dylib; do[[ -f "$macos/$name" ]] || { print -u2 "Missing binary: Contents/MacOS/$name"; exit 1; }/usr/bin/file "$macos/$name" | /usr/bin/grep -q 'Mach-O' || {@@ -31,15 +31,43 @@ for name in vphoned.plist entitlements.plist; dodone/usr/bin/codesign --verify --strict "$bundle"+/usr/bin/codesign --verify "$macos/vphone-vm"/usr/bin/codesign --verify "$macos/vphone-cli"/usr/bin/codesign --verify "$macos/VPhoneEscalator"/usr/bin/codesign --verify "$macos/vphoned.signed"-entitlements="$(/usr/bin/codesign -d --entitlements - --xml "$bundle" 2>/dev/null)"-[[ "$entitlements" == *'com.apple.private.virtualization'* ]] || {+[[ "$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$bundle/Contents/Info.plist")" == "vphone-app" ]] || {+ print -u2 "The unentitled app launcher is not the bundle executable"+ exit 1+}+app_entitlements="$(/usr/bin/codesign -d --entitlements - --xml "$bundle" 2>/dev/null || true)"+[[ "$app_entitlements" != *'com.apple.private.virtualization'* ]] || {+ print -u2 "The app must not carry private virtualization entitlements"+ exit 1+}+vm_entitlements="$(/usr/bin/codesign -d --entitlements - --xml "$macos/vphone-vm" 2>/dev/null)"+[[ "$vm_entitlements" == *'com.apple.private.virtualization'* ]] || {print -u2 "VM private entitlements are missing"exit 1}+[[ "$vm_entitlements" != *'com.apple.CommCenter.fine-grained'* ]] || {+ print -u2 "Guest daemon entitlements leaked into vphone-vm"+ exit 1+}+daemon_entitlements="$(/usr/bin/codesign -d --entitlements - --xml "$macos/vphoned.signed" 2>/dev/null)"+[[ "$daemon_entitlements" == *'com.apple.CommCenter.fine-grained'* &&+ "$daemon_entitlements" != *'com.apple.private.virtualization'* ]] || {+ print -u2 "vphoned has the wrong entitlements"+ exit 1+}+for name in vphone-cli vpregister VPhoneEscalator; do+ process_entitlements="$(/usr/bin/codesign -d --entitlements - --xml "$macos/$name" 2>/dev/null || true)"+ [[ "$process_entitlements" != *'com.apple.private.virtualization'* &&+ "$process_entitlements" != *'com.apple.CommCenter.fine-grained'* ]] || {+ print -u2 "Unexpected private entitlements on $name"+ exit 1+ }+donefor name in vphone-vm vphone-cli VPhoneEscalator; do/usr/bin/otool -L "$macos/$name" | /usr/bin/awk 'NR > 1 {print $1}' |diff --git a/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swiftindex 61816eb0..6e2ca7ed 100644--- a/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift@@ -23,7 +23,7 @@ import Foundationenum VPhoneCustomFirmwareDyldSharedCacheVerbs {/// Registered into `vphone-cli cfw` by `VPhoneCustomFirmwareCommand`.- static let all: [ParsableCommand.Type] = [+ static var all: [ParsableCommand.Type] { [VPhoneCustomFirmwarePatchHypervisorVirtualMachineDyldSharedCacheCommand.self,VPhoneCustomFirmwarePatchIOMFBSwapEndCommand.self,VPhoneCustomFirmwarePatchIOMFBForceKernCommand.self,@@ -32,7 +32,7 @@ enum VPhoneCustomFirmwareDyldSharedCacheVerbs {VPhoneCustomFirmwarePatchXPCLWCRCommand.self,VPhoneCustomFirmwarePatchLockdownModeCommand.self,VPhoneCustomFirmwarePatchCameraDyldSharedCacheCommand.self,- ]+ ] }/// Where the patchers' progress lines go.///diff --git a/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swiftindex c7116ef0..8af13235 100644--- a/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift+++ b/VPhoneExecutable/VPhoneCommand/Sources/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift@@ -302,12 +302,12 @@ enum VPhoneCustomFirmwareMachOVerbs {////// Ordered as `cfw.py`'s dispatch table lists them, so `--help` and the/// Python's usage block read in the same order.- static let all: [ParsableCommand.Type] = [+ static var all: [ParsableCommand.Type] { [VPhoneCustomFirmwarePatchSeputilCommand.self,VPhoneCustomFirmwarePatchLaunchdCacheLoaderCommand.self,VPhoneCustomFirmwarePatchMobileactivationdCommand.self,VPhoneCustomFirmwarePatchLaunchdJetsamCommand.self,VPhoneCustomFirmwarePatchWatchdogdCommand.self,VPhoneCustomFirmwarePatchDiskimagesiodCommand.self,- ]+ ] }}diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/project.pbxproj b/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/project.pbxprojindex c651cb45..8b8908b0 100644--- a/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/project.pbxproj+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/project.pbxproj@@ -7,18 +7,10 @@objects = {/* Begin PBXBuildFile section */- 5036444C30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };- 5036444D30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };- 5036444E30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };- 5036444F30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };5036445030653D1000CAADDF /* Capstone in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000201 /* Capstone */; };5036445130653D1000CAADDF /* Img4tool in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000202 /* Img4tool */; };5036445230653D1000CAADDF /* MachOKit in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000203 /* MachOKit */; };5036445330653D1000CAADDF /* LibArchive in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000205 /* LibArchive */; };- 50364C1630653DE900CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };- 50364C1730653DE900CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };- 50364C1830653DE900CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };- 50364C1930653DE900CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };50364C1A30653DE900CAADDF /* Capstone in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000201 /* Capstone */; };50364C1B30653DE900CAADDF /* Img4tool in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000202 /* Img4tool */; };50364C1C30653DE900CAADDF /* MachOKit in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000203 /* MachOKit */; };@@ -32,6 +24,7 @@BB0000000000000000000106 /* AppleMobileDeviceLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = BB0000000000000000000206 /* AppleMobileDeviceLibrary */; };BB0000000000000000000107 /* libFirmwarePatcher.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BB0000000000000000000033 /* libFirmwarePatcher.a */; };BB0000000000000000000108 /* libVPhoneSign.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BB0000000000000000000032 /* libVPhoneSign.a */; };+ BB0000000000000000000109 /* ArgumentParser in FirmwarePatcher */ = {isa = PBXBuildFile; productRef = BB0000000000000000000204 /* ArgumentParser */; };/* End PBXBuildFile section *//* Begin PBXContainerItemProxy section */@@ -93,10 +86,6 @@5036445130653D1000CAADDF /* Img4tool in Frameworks */,5036445030653D1000CAADDF /* Capstone in Frameworks */,BB0000000000000000000104 /* ArgumentParser in Frameworks */,- 5036444C30653D1000CAADDF /* (null) in Frameworks */,- 5036444D30653D1000CAADDF /* (null) in Frameworks */,- 5036444E30653D1000CAADDF /* (null) in Frameworks */,- 5036444F30653D1000CAADDF /* (null) in Frameworks */,BB0000000000000000000106 /* AppleMobileDeviceLibrary in Frameworks */,);runOnlyForDeploymentPostprocessing = 0;@@ -112,6 +101,7 @@isa = PBXFrameworksBuildPhase;buildActionMask = 2147483647;files = (+ BB0000000000000000000109 /* ArgumentParser in FirmwarePatcher */,BB0000000000000000000101 /* Capstone in Frameworks */,BB0000000000000000000102 /* Img4tool in Frameworks */,BB0000000000000000000103 /* MachOKit in Frameworks */,@@ -127,10 +117,6 @@50364C1C30653DE900CAADDF /* MachOKit in Frameworks */,BB0000000000000000000107 /* libFirmwarePatcher.a in Frameworks */,BB0000000000000000000108 /* libVPhoneSign.a in Frameworks */,- 50364C1630653DE900CAADDF /* (null) in Frameworks */,- 50364C1730653DE900CAADDF /* (null) in Frameworks */,- 50364C1830653DE900CAADDF /* (null) in Frameworks */,- 50364C1930653DE900CAADDF /* (null) in Frameworks */,50364C1B30653DE900CAADDF /* Img4tool in Frameworks */,50364C1D30653DE900CAADDF /* LibArchive in Frameworks */,);@@ -241,6 +227,7 @@);name = FirmwarePatcher;packageProductDependencies = (+ BB0000000000000000000204 /* ArgumentParser */,BB0000000000000000000201 /* Capstone */,BB0000000000000000000202 /* Img4tool */,BB0000000000000000000203 /* MachOKit */,diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/xcshareddata/xcschemes/FirmwarePatcherTests.xcscheme b/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/xcshareddata/xcschemes/FirmwarePatcherTests.xcschemenew file mode 100644index 00000000..cc3d4bd3--- /dev/null+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/xcshareddata/xcschemes/FirmwarePatcherTests.xcscheme@@ -0,0 +1,17 @@+<?xml version="1.0" encoding="UTF-8"?>+<Scheme LastUpgradeVersion="2700" version="1.3">+ <BuildAction parallelizeBuildables="YES" buildImplicitDependencies="YES">+ <BuildActionEntries>+ <BuildActionEntry buildForTesting="YES" buildForRunning="NO" buildForProfiling="NO" buildForArchiving="NO" buildForAnalyzing="YES">+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="BB0000000000000000000014" BuildableName="FirmwarePatcherTests.xctest" BlueprintName="FirmwarePatcherTests" ReferencedContainer="container:VPhoneCommand.xcodeproj"/>+ </BuildActionEntry>+ </BuildActionEntries>+ </BuildAction>+ <TestAction buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.IDEFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES">+ <Testables>+ <TestableReference skipped="NO">+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="BB0000000000000000000014" BuildableName="FirmwarePatcherTests.xctest" BlueprintName="FirmwarePatcherTests" ReferencedContainer="container:VPhoneCommand.xcodeproj"/>+ </TestableReference>+ </Testables>+ </TestAction>+</Scheme>diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/xcshareddata/xcschemes/VPhoneSignTests.xcscheme b/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/xcshareddata/xcschemes/VPhoneSignTests.xcschemenew file mode 100644index 00000000..b1314101--- /dev/null+++ b/VPhoneExecutable/VPhoneCommand/VPhoneCommand.xcodeproj/xcshareddata/xcschemes/VPhoneSignTests.xcscheme@@ -0,0 +1,17 @@+<?xml version="1.0" encoding="UTF-8"?>+<Scheme LastUpgradeVersion="2700" version="1.3">+ <BuildAction parallelizeBuildables="YES" buildImplicitDependencies="YES">+ <BuildActionEntries>+ <BuildActionEntry buildForTesting="YES" buildForRunning="NO" buildForProfiling="NO" buildForArchiving="NO" buildForAnalyzing="YES">+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="BB0000000000000000000015" BuildableName="VPhoneSignTests.xctest" BlueprintName="VPhoneSignTests" ReferencedContainer="container:VPhoneCommand.xcodeproj"/>+ </BuildActionEntry>+ </BuildActionEntries>+ </BuildAction>+ <TestAction buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.IDEFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES">+ <Testables>+ <TestableReference skipped="NO">+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="BB0000000000000000000015" BuildableName="VPhoneSignTests.xctest" BlueprintName="VPhoneSignTests" ReferencedContainer="container:VPhoneCommand.xcodeproj"/>+ </TestableReference>+ </Testables>+ </TestAction>+</Scheme>diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/project.pbxproj b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/project.pbxprojindex a838843e..0ff47064 100644--- a/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/project.pbxproj+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/project.pbxproj@@ -7,9 +7,7 @@objects = {/* Begin PBXBuildFile section */- 5036460E30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };5036460F30653D1000CAADDF /* AppleMobileDeviceLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = CC0000000000000000000201 /* AppleMobileDeviceLibrary */; };- 5036461030653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };5036461130653D1000CAADDF /* AppleMobileDeviceLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = CC0000000000000000000201 /* AppleMobileDeviceLibrary */; };CC0000000000000000000101 /* AppleMobileDeviceLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = CC0000000000000000000201 /* AppleMobileDeviceLibrary */; };CC0000000000000000000102 /* libVPhoneRestore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CC0000000000000000000031 /* libVPhoneRestore.a */; };@@ -75,7 +73,6 @@isa = PBXFrameworksBuildPhase;buildActionMask = 2147483647;files = (- 5036460E30653D1000CAADDF /* (null) in Frameworks */,5036460F30653D1000CAADDF /* AppleMobileDeviceLibrary in Frameworks */,);runOnlyForDeploymentPostprocessing = 0;@@ -88,7 +85,6 @@CC0000000000000000000103 /* libMobileRecoveryCore.a in Frameworks */,CC0000000000000000000104 /* libMobileRestoreCore.a in Frameworks */,5036461130653D1000CAADDF /* AppleMobileDeviceLibrary in Frameworks */,- 5036461030653D1000CAADDF /* (null) in Frameworks */,);runOnlyForDeploymentPostprocessing = 0;};diff --git a/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/xcshareddata/xcschemes/VPhoneRestoreTests.xcscheme b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/xcshareddata/xcschemes/VPhoneRestoreTests.xcschemenew file mode 100644index 00000000..7259125a--- /dev/null+++ b/VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore.xcodeproj/xcshareddata/xcschemes/VPhoneRestoreTests.xcscheme@@ -0,0 +1,17 @@+<?xml version="1.0" encoding="UTF-8"?>+<Scheme LastUpgradeVersion="2700" version="1.3">+ <BuildAction parallelizeBuildables="YES" buildImplicitDependencies="YES">+ <BuildActionEntries>+ <BuildActionEntry buildForTesting="YES" buildForRunning="NO" buildForProfiling="NO" buildForArchiving="NO" buildForAnalyzing="YES">+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="CC0000000000000000000014" BuildableName="VPhoneRestoreTests.xctest" BlueprintName="VPhoneRestoreTests" ReferencedContainer="container:VPhoneRestore.xcodeproj"/>+ </BuildActionEntry>+ </BuildActionEntries>+ </BuildAction>+ <TestAction buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.IDEFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES">+ <Testables>+ <TestableReference skipped="NO">+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="CC0000000000000000000014" BuildableName="VPhoneRestoreTests.xctest" BlueprintName="VPhoneRestoreTests" ReferencedContainer="container:VPhoneRestore.xcodeproj"/>+ </TestableReference>+ </Testables>+ </TestAction>+</Scheme>diff --git a/VPhoneExecutable/VPhoneEscalator/VPhoneEscalator.xcodeproj/project.pbxproj b/VPhoneExecutable/VPhoneEscalator/VPhoneEscalator.xcodeproj/project.pbxprojindex 3bdc48b4..e829dd62 100644--- a/VPhoneExecutable/VPhoneEscalator/VPhoneEscalator.xcodeproj/project.pbxproj+++ b/VPhoneExecutable/VPhoneEscalator/VPhoneEscalator.xcodeproj/project.pbxproj@@ -52,8 +52,8 @@/* Begin XCBuildConfiguration section */EE0000000000000000000061 /* Debug */ = {isa = XCBuildConfiguration; buildSettings = {ARCHS = arm64e; CODE_SIGNING_ALLOWED = NO; MACOSX_DEPLOYMENT_TARGET = 15.0; OTHER_LDFLAGS = ("$(inherited)", "-framework", CoreFoundation, "-framework", Security, ); PRODUCT_NAME = VPhoneEscalator; SDKROOT = macosx; }; name = Debug; };EE0000000000000000000062 /* Release */ = {isa = XCBuildConfiguration; buildSettings = {ARCHS = arm64e; CODE_SIGNING_ALLOWED = NO; MACOSX_DEPLOYMENT_TARGET = 15.0; OTHER_LDFLAGS = ("$(inherited)", "-framework", CoreFoundation, "-framework", Security, ); PRODUCT_NAME = VPhoneEscalator; SDKROOT = macosx; }; name = Release; };- EE0000000000000000000071 /* Debug */ = {isa = XCBuildConfiguration; buildSettings = {ARCHS = arm64e; CODE_SIGNING_ALLOWED = NO; MACOSX_DEPLOYMENT_TARGET = 15.0; SDKROOT = macosx; }; name = Debug; };- EE0000000000000000000072 /* Release */ = {isa = XCBuildConfiguration; buildSettings = {ARCHS = arm64e; CODE_SIGNING_ALLOWED = NO; MACOSX_DEPLOYMENT_TARGET = 15.0; SDKROOT = macosx; }; name = Release; };+ EE0000000000000000000071 /* Debug */ = {isa = XCBuildConfiguration; buildSettings = {ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = arm64e; CODE_SIGNING_ALLOWED = NO; MACOSX_DEPLOYMENT_TARGET = 15.0; SDKROOT = macosx; }; name = Debug; };+ EE0000000000000000000072 /* Release */ = {isa = XCBuildConfiguration; buildSettings = {ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = arm64e; CODE_SIGNING_ALLOWED = NO; MACOSX_DEPLOYMENT_TARGET = 15.0; SDKROOT = macosx; }; name = Release; };/* End XCBuildConfiguration section *//* Begin XCConfigurationList section */EE0000000000000000000080 /* Build configuration list for PBXProject "VPhoneEscalator" */ = {isa = XCConfigurationList; buildConfigurations = (EE0000000000000000000071 /* Debug */, EE0000000000000000000072 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };diff --git a/VPhoneExecutable/VPhoneVirtualization/Build/StageApp.sh b/VPhoneExecutable/VPhoneVirtualization/Build/StageApp.shindex da7c39cb..9d367484 100755--- a/VPhoneExecutable/VPhoneVirtualization/Build/StageApp.sh+++ b/VPhoneExecutable/VPhoneVirtualization/Build/StageApp.sh@@ -48,6 +48,7 @@ escalator_products="$root/.build/XcodeEscalator/Build/Products/$configuration"guest_products="$root/.build/guest-components/stage"/bin/mkdir -p "$macos" "$resources/scripts/vphoned" "$resources/guest"+/bin/cp "$TARGET_BUILD_DIR/vphone-vm" "$macos/vphone-vm"/bin/cp "$command_products/vphone-cli" "$macos/vphone-cli"/bin/cp "$daemon_products/vphoned" "$macos/vphoned"/bin/cp "$daemon_products/vphoned" "$macos/vphoned.signed"@@ -63,9 +64,24 @@ guest_products="$root/.build/guest-components/stage"/bin/cp "$guest_products/vcamcaptured/libvcamcaptured.plist" "$resources/guest/libvcamcaptured.plist"/bin/cp "$root/VPhoneExecutable/VPhoneVirtualization/Resources/AppIcon.icns" "$resources/AppIcon.icns"+# vphone-vm needs Swift's span back-deployment library on macOS 15. Xcode's+# app-only Swift library pass prunes the standard library name because it scans+# only the unentitled app executable. Use a private load name for the VM child.+compatibility_library="$(/usr/bin/xcrun swift-stdlib-tool --print \+ --scan-executable "$macos/vphone-vm" --platform macosx | \+ /usr/bin/grep '/libswiftCompatibilitySpan.dylib$')"+/bin/cp "$compatibility_library" "$macos/libswiftCompatibilitySpan.vphone.dylib"+/usr/bin/install_name_tool -change @rpath/libswiftCompatibilitySpan.dylib \+ @loader_path/libswiftCompatibilitySpan.vphone.dylib "$macos/vphone-vm"+/bin/rm -f "$macos/libswiftCompatibilitySpan.dylib" \+ "$macos/libswiftCompatibilitySpan.dylib.original"+/bin/rm -f "$app/Contents/Frameworks/libswiftCompatibilitySpan.dylib"+/usr/bin/codesign --force --sign - "$macos/vphone-cli"/usr/bin/codesign --force --sign - --entitlements "$root/VPhoneDaemon/Configuration/entitlements.plist" "$macos/vphoned"/usr/bin/codesign --force --sign - --entitlements "$root/VPhoneDaemon/Configuration/entitlements.plist" "$macos/vphoned.signed"/usr/bin/codesign --force --sign - "$macos/vpregister"/usr/bin/codesign --force --sign - "$macos/VPhoneEscalator"-/usr/bin/codesign --force --sign - --entitlements "$root/VPhoneExecutable/VPhoneVirtualization/Resources/vphone.entitlements" "$app"+/usr/bin/codesign --force --sign - "$macos/libswiftCompatibilitySpan.vphone.dylib"+/usr/bin/codesign --force --sign - --entitlements "$root/VPhoneExecutable/VPhoneVirtualization/Resources/vphone.entitlements" "$macos/vphone-vm"+/usr/bin/codesign --force --sign - "$app"diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/Info.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/Info.plistindex 987d6880..c9cc73af 100644--- a/VPhoneExecutable/VPhoneVirtualization/Resources/Info.plist+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/Info.plist@@ -4,10 +4,9 @@<dict><key>CFBundleIdentifier</key><string>com.vphone.app</string>- <!-- The app launches vphone-vm; vphone-cli is a companion executable in- Contents/MacOS. -->+ <!-- The unentitled app launches the separately signed vphone-vm process. --><key>CFBundleExecutable</key>- <string>vphone-vm</string>+ <string>vphone-app</string><key>CFBundleName</key><string>VPhone</string><key>CFBundlePackageType</key>diff --git a/VPhoneExecutable/VPhoneVirtualization/Sources/main.swift b/VPhoneExecutable/VPhoneVirtualization/Sources/main.swiftindex b0fd95c6..c6102bc6 100644--- a/VPhoneExecutable/VPhoneVirtualization/Sources/main.swift+++ b/VPhoneExecutable/VPhoneVirtualization/Sources/main.swift@@ -1,17 +1,46 @@-// vphone-vm — the process that actually runs a guest.-//-// This is the only binary in the project signed with the private-// virtualization entitlements (Sources/vphone.entitlements), and it is-// deliberately the smallest thing that can hold them: it parses the boot-// options, becomes an NSApplication, and hands off to VPhoneVirtualMachineAppDelegate.-// Everything a user types goes through vphone-cli, which carries no-// entitlements at all and starts this binary for the boot.-//-// It takes the boot options directly rather than a `boot` subcommand — this-// binary has exactly one job, so there is nothing to select between.+import AppKit+import Foundation-import ArgumentParser-import VPhoneCoreKit-import VPhoneVirtualMachineKit+let app = NSApplication.shared+app.setActivationPolicy(.regular)+app.activate(ignoringOtherApps: true)-VPhoneGuestApp.run(VPhoneBootCommand.parseOrExit())+let arguments: [String]+if CommandLine.arguments.count > 1 {+ arguments = Array(CommandLine.arguments.dropFirst())+} else {+ let picker = NSOpenPanel()+ picker.title = "Choose a virtual iPhone configuration"+ picker.prompt = "Launch"+ picker.allowedContentTypes = [.propertyList]+ picker.allowsOtherFileTypes = false+ picker.canChooseDirectories = false+ guard picker.runModal() == .OK, let config = picker.url else {+ exit(EXIT_SUCCESS)+ }+ arguments = ["--config", config.path]+}++guard let executableDirectory = Bundle.main.executableURL?.deletingLastPathComponent() else {+ fatalError("The application executable has no bundle path")+}+let virtualMachineExecutable = executableDirectory.appendingPathComponent("vphone-vm")+let process = Process()+process.executableURL = virtualMachineExecutable+process.arguments = arguments++do {+ try process.run()+ process.waitUntilExit()+ if process.terminationStatus != 0 {+ let alert = NSAlert()+ alert.messageText = "The virtual iPhone could not start"+ alert.informativeText = "The vphone-vm process exited with status \(process.terminationStatus). Run vphone-cli vm launch in Terminal for the full error."+ alert.runModal()+ }+} catch {+ let alert = NSAlert()+ alert.messageText = "The virtual iPhone could not start"+ alert.informativeText = error.localizedDescription+ alert.runModal()+}diff --git a/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift b/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swiftindex 4479a328..1f32e524 100644--- a/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift+++ b/VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift@@ -176,7 +176,7 @@ class VPhoneVirtualMachineAppDelegate: NSObject, NSApplicationDelegate {hostAutomationServer = server// Wire location toggle through onConnect/onDisconnect- control.onConnect = { [weak mc, weak provider = locationProvider] caps in+ control.onConnect = { [weak self, weak mc, weak provider = locationProvider] caps inmc?.updateConnectAvailability(available: true)mc?.updateInstallAvailability(available: caps.contains("ipa_install"))mc?.updateAppsAvailability(available: caps.contains("apps"))@@ -211,7 +211,7 @@ class VPhoneVirtualMachineAppDelegate: NSObject, NSApplicationDelegate {}} else if !command.dfu {// Headless mode: auto-start location as before (no menu exists)- control.onConnect = { [weak provider = locationProvider] caps in+ control.onConnect = { [weak self, weak provider = locationProvider] caps inif caps.contains("location") {provider?.startForwarding()} else {diff --git a/VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj/project.pbxproj b/VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj/project.pbxprojindex 96760e07..f432fed9 100644--- a/VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj/project.pbxproj+++ b/VPhoneExecutable/VPhoneVirtualization/VPhoneVirtualization.xcodeproj/project.pbxproj@@ -12,6 +12,7 @@DD0000000000000000000103 /* NIOCore in Frameworks */ = {isa = PBXBuildFile; productRef = DD0000000000000000000203 /* NIOCore */; };DD0000000000000000000104 /* NIOPosix in Frameworks */ = {isa = PBXBuildFile; productRef = DD0000000000000000000204 /* NIOPosix */; };DD0000000000000000000105 /* libVPhoneVirtualMachineKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DD0000000000000000000032 /* libVPhoneVirtualMachineKit.a */; };+ DD0000000000000000000106 /* ArgumentParser in VPhoneVirtualMachineKit */ = {isa = PBXBuildFile; productRef = DD0000000000000000000201 /* ArgumentParser */; };/* End PBXBuildFile section *//* Begin PBXContainerItemProxy section */@@ -22,11 +23,19 @@remoteGlobalIDString = DD0000000000000000000012;remoteInfo = VPhoneVirtualMachineKit;};+ DD0000000000000000000124 /* PBXContainerItemProxy */ = {+ isa = PBXContainerItemProxy;+ containerPortal = DD0000000000000000000001 /* Project object */;+ proxyType = 1;+ remoteGlobalIDString = DD0000000000000000000013;+ remoteInfo = "vphone-vm";+ };/* End PBXContainerItemProxy section *//* Begin PBXFileReference section */DD0000000000000000000031 /* vphone-app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "vphone-app.app"; sourceTree = BUILT_PRODUCTS_DIR; };DD0000000000000000000032 /* libVPhoneVirtualMachineKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVPhoneVirtualMachineKit.a; sourceTree = BUILT_PRODUCTS_DIR; };+ DD0000000000000000000033 /* vphone-vm */ = {isa = PBXFileReference; explicitFileType = compiled.mach-o.executable; includeInIndex = 0; path = "vphone-vm"; sourceTree = BUILT_PRODUCTS_DIR; };/* End PBXFileReference section *//* Begin PBXFileSystemSynchronizedRootGroup section */@@ -34,6 +43,7 @@DD0000000000000000000022 /* UI */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = UI; sourceTree = "<group>"; };DD0000000000000000000023 /* Resources */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Resources; sourceTree = "<group>"; };DD0000000000000000000024 /* Build */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = Build; sourceTree = "<group>"; };+ DD0000000000000000000025 /* VirtualMachineProcess */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = VirtualMachineProcess; sourceTree = "<group>"; };/* End PBXFileSystemSynchronizedRootGroup section *//* Begin PBXFrameworksBuildPhase section */@@ -50,12 +60,14 @@isa = PBXFrameworksBuildPhase;buildActionMask = 2147483647;files = (+ DD0000000000000000000106 /* ArgumentParser in VPhoneVirtualMachineKit */,DD0000000000000000000102 /* Dynamic in Frameworks */,DD0000000000000000000103 /* NIOCore in Frameworks */,DD0000000000000000000104 /* NIOPosix in Frameworks */,);runOnlyForDeploymentPostprocessing = 0;};+ DD0000000000000000000043 /* Frameworks */ = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (); runOnlyForDeploymentPostprocessing = 0; };/* End PBXFrameworksBuildPhase section *//* Begin PBXGroup section */@@ -66,6 +78,7 @@DD0000000000000000000022 /* UI */,DD0000000000000000000023 /* Resources */,DD0000000000000000000024 /* Build */,+ DD0000000000000000000025 /* VirtualMachineProcess */,DD0000000000000000000003 /* Products */,);sourceTree = "<group>";@@ -75,6 +88,7 @@children = (DD0000000000000000000031 /* vphone-app.app */,DD0000000000000000000032 /* libVPhoneVirtualMachineKit.a */,+ DD0000000000000000000033 /* vphone-vm */,);name = Products;sourceTree = "<group>";@@ -87,21 +101,19 @@buildConfigurationList = DD0000000000000000000081 /* Build configuration list for PBXNativeTarget "vphone-app" */;buildPhases = (DD0000000000000000000051 /* Sources */,- DD0000000000000000000041 /* Frameworks */,+ DD0000000000000000000043 /* Frameworks */,DD0000000000000000000061 /* Bundle Companion Binaries */,);buildRules = ();dependencies = (- DD0000000000000000000121 /* PBXTargetDependency */,+ DD0000000000000000000123 /* PBXTargetDependency */,);fileSystemSynchronizedGroups = (DD0000000000000000000021 /* Sources */,);name = "vphone-app";- packageProductDependencies = (- DD0000000000000000000201 /* ArgumentParser */,- );+ packageProductDependencies = ();productName = "vphone-app";productReference = DD0000000000000000000031 /* vphone-app.app */;productType = "com.apple.product-type.application";@@ -123,6 +135,7 @@);name = VPhoneVirtualMachineKit;packageProductDependencies = (+ DD0000000000000000000201 /* ArgumentParser */,DD0000000000000000000202 /* Dynamic */,DD0000000000000000000203 /* NIOCore */,DD0000000000000000000204 /* NIOPosix */,@@ -131,6 +144,28 @@productReference = DD0000000000000000000032 /* libVPhoneVirtualMachineKit.a */;productType = "com.apple.product-type.library.static";};+ DD0000000000000000000013 /* vphone-vm */ = {+ isa = PBXNativeTarget;+ buildConfigurationList = DD0000000000000000000083 /* Build configuration list for PBXNativeTarget "vphone-vm" */;+ buildPhases = (+ DD0000000000000000000053 /* Sources */,+ DD0000000000000000000041 /* Frameworks */,+ );+ buildRules = ();+ dependencies = (+ DD0000000000000000000121 /* PBXTargetDependency */,+ );+ fileSystemSynchronizedGroups = (+ DD0000000000000000000025 /* VirtualMachineProcess */,+ );+ name = "vphone-vm";+ packageProductDependencies = (+ DD0000000000000000000201 /* ArgumentParser */,+ );+ productName = "vphone-vm";+ productReference = DD0000000000000000000033 /* vphone-vm */;+ productType = "com.apple.product-type.tool";+ };/* End PBXNativeTarget section *//* Begin PBXProject section */@@ -159,6 +194,7 @@targets = (DD0000000000000000000011 /* vphone-app */,DD0000000000000000000012 /* VPhoneVirtualMachineKit */,+ DD0000000000000000000013 /* vphone-vm */,);};/* End PBXProject section */@@ -211,6 +247,7 @@);runOnlyForDeploymentPostprocessing = 0;};+ DD0000000000000000000053 /* Sources */ = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (); runOnlyForDeploymentPostprocessing = 0; };/* End PBXSourcesBuildPhase section *//* Begin PBXTargetDependency section */@@ -219,6 +256,11 @@target = DD0000000000000000000012 /* VPhoneVirtualMachineKit */;targetProxy = DD0000000000000000000122 /* PBXContainerItemProxy */;};+ DD0000000000000000000123 /* PBXTargetDependency */ = {+ isa = PBXTargetDependency;+ target = DD0000000000000000000013 /* vphone-vm */;+ targetProxy = DD0000000000000000000124 /* PBXContainerItemProxy */;+ };/* End PBXTargetDependency section *//* Begin XCBuildConfiguration section */@@ -228,21 +270,14 @@ALWAYS_SEARCH_USER_PATHS = NO;ARCHS = arm64;CODE_SIGNING_ALLOWED = NO;- EXECUTABLE_NAME = "vphone-vm";+ EXECUTABLE_NAME = "vphone-app";GENERATE_INFOPLIST_FILE = NO;INFOPLIST_FILE = Resources/Info.plist;- LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";MACOSX_DEPLOYMENT_TARGET = 15.0;- OTHER_LDFLAGS = (- "$(inherited)",- "-lVPhoneVirtualMachineKit",- "-lVPhoneCoreKit",- );PRODUCT_BUNDLE_IDENTIFIER = com.vphone.app;PRODUCT_MODULE_NAME = VPhoneVirtualization;PRODUCT_NAME = "vphone-app";SDKROOT = macosx;- SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";SWIFT_STRICT_CONCURRENCY = complete;SWIFT_VERSION = 6.0;};@@ -254,21 +289,14 @@ALWAYS_SEARCH_USER_PATHS = NO;ARCHS = arm64;CODE_SIGNING_ALLOWED = NO;- EXECUTABLE_NAME = "vphone-vm";+ EXECUTABLE_NAME = "vphone-app";GENERATE_INFOPLIST_FILE = NO;INFOPLIST_FILE = Resources/Info.plist;- LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";MACOSX_DEPLOYMENT_TARGET = 15.0;- OTHER_LDFLAGS = (- "$(inherited)",- "-lVPhoneVirtualMachineKit",- "-lVPhoneCoreKit",- );PRODUCT_BUNDLE_IDENTIFIER = com.vphone.app;PRODUCT_MODULE_NAME = VPhoneVirtualization;PRODUCT_NAME = "vphone-app";SDKROOT = macosx;- SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";SWIFT_STRICT_CONCURRENCY = complete;SWIFT_VERSION = 6.0;};@@ -342,6 +370,48 @@};name = Release;};+ DD0000000000000000000077 /* Debug */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ ALWAYS_SEARCH_USER_PATHS = NO;+ ARCHS = arm64;+ CODE_SIGNING_ALLOWED = NO;+ LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";+ MACOSX_DEPLOYMENT_TARGET = 15.0;+ OTHER_LDFLAGS = (+ "$(inherited)",+ "-lVPhoneVirtualMachineKit",+ "-lVPhoneCoreKit",+ );+ PRODUCT_NAME = "vphone-vm";+ SDKROOT = macosx;+ SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";+ SWIFT_STRICT_CONCURRENCY = complete;+ SWIFT_VERSION = 6.0;+ };+ name = Debug;+ };+ DD0000000000000000000078 /* Release */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ ALWAYS_SEARCH_USER_PATHS = NO;+ ARCHS = arm64;+ CODE_SIGNING_ALLOWED = NO;+ LIBRARY_SEARCH_PATHS = "$(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";+ MACOSX_DEPLOYMENT_TARGET = 15.0;+ OTHER_LDFLAGS = (+ "$(inherited)",+ "-lVPhoneVirtualMachineKit",+ "-lVPhoneCoreKit",+ );+ PRODUCT_NAME = "vphone-vm";+ SDKROOT = macosx;+ SWIFT_INCLUDE_PATHS = "$(BUILT_PRODUCTS_DIR) $(SRCROOT)/../../.build/XcodeKit/Build/Products/$(CONFIGURATION)";+ SWIFT_STRICT_CONCURRENCY = complete;+ SWIFT_VERSION = 6.0;+ };+ name = Release;+ };/* End XCBuildConfiguration section *//* Begin XCConfigurationList section */@@ -372,6 +442,15 @@defaultConfigurationIsVisible = 0;defaultConfigurationName = Release;};+ DD0000000000000000000083 /* Build configuration list for PBXNativeTarget "vphone-vm" */ = {+ isa = XCConfigurationList;+ buildConfigurations = (+ DD0000000000000000000077 /* Debug */,+ DD0000000000000000000078 /* Release */,+ );+ defaultConfigurationIsVisible = 0;+ defaultConfigurationName = Release;+ };/* End XCConfigurationList section *//* Begin XCRemoteSwiftPackageReference section */diff --git a/VPhoneExecutable/VPhoneVirtualization/VirtualMachineProcess/main.swift b/VPhoneExecutable/VPhoneVirtualization/VirtualMachineProcess/main.swiftnew file mode 100644index 00000000..fe980467--- /dev/null+++ b/VPhoneExecutable/VPhoneVirtualization/VirtualMachineProcess/main.swift@@ -0,0 +1,17 @@+// vphone-vm — the process that actually runs a guest.+//+// This is the only binary in the project signed with the private+// virtualization entitlements (Resources/vphone.entitlements), and it is+// deliberately the smallest thing that can hold them: it parses the boot+// options, becomes an NSApplication, and hands off to VPhoneVirtualMachineAppDelegate.+// The unentitled vphone-app launcher and vphone-cli start this process for+// the boot. Neither launcher carries private virtualization entitlements.+//+// It takes the boot options directly rather than a `boot` subcommand — this+// binary has exactly one job, so there is nothing to select between.++import ArgumentParser+import VPhoneCoreKit+import VPhoneVirtualMachineKit++VPhoneGuestApp.run(VPhoneBootCommand.parseOrExit())diff --git a/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneResources.swift b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneResources.swiftindex f94ae517..6636129c 100644--- a/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneResources.swift+++ b/VPhoneKit/VPhoneCoreKit/Firmware/VPhoneResources.swift@@ -18,9 +18,8 @@ public struct VPhoneResources: Sendable {/// bare name under a PATH or symlink launch, which `URL(fileURLWithPath:)`/// then resolves against the CWD and lands under `$HOME`./// `Bundle.main.executableURL` reads `CFBundleExecutable` out of Info.plist- /// — and now that the bundle declares `vphone-vm`, it answers "vphone-vm"- /// even when the running binary is `vphone-cli` sitting right beside it in- /// the same `Contents/MacOS`. It cannot be used to find ourselves.+ /// and answers "vphone-app" even when the running binary is `vphone-cli`+ /// or `vphone-vm` beside it in `Contents/MacOS`. It cannot find ourselves.////// `_NSGetExecutablePath` has neither problem: it is the path the kernel/// exec'd, independent of argv and of any plist. Symlinks are resolved so adiff --git a/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestBinaries.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestBinaries.swiftindex 806e88d8..2606745a 100644--- a/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestBinaries.swift+++ b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestBinaries.swift@@ -13,7 +13,7 @@ public enum VPhoneGuestBinaries {switch self {case let .missing(name, searched):"""- no prebuilt guest binary '\(name)'. Run 'zsh Scripts/build.sh'.+ no prebuilt guest binary '\(name)'. Build the vphone-app scheme in VPhone.xcworkspace.Looked in: \(searched.map(\.path).joined(separator: ", "))"""}diff --git a/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestLauncher.swift b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestLauncher.swiftindex ef4edce2..73d3e2e6 100644--- a/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestLauncher.swift+++ b/VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestLauncher.swift@@ -17,7 +17,7 @@ public enum VPhoneGuestLaunchError: Error, CustomStringConvertible {return """\(name) is missing — expected it next to this binary at:\(url.path)- The install looks incomplete. Rebuild with `zsh Scripts/build.sh`.+ The install looks incomplete. Rebuild the vphone-app scheme in Xcode."""case let .blockedByAMFI(guest, cdHash):@@ -40,7 +40,7 @@ public enum VPhoneGuestLaunchError: Error, CustomStringConvertible {case let .missingEntitlements(guest):return """vphone-vm is missing the private PV=3 entitlements: \(guest.path)- Run `zsh Scripts/build.sh` to sign this binary, then allow the new signature+ Rebuild the vphone-app scheme in Xcode to sign this binary, then allow the new signaturethrough the host's AMFI policy before launching a VM."""diff --git a/VPhoneKit/VPhoneKit.xcodeproj/project.pbxproj b/VPhoneKit/VPhoneKit.xcodeproj/project.pbxprojindex e8457aad..5fb1e3b6 100644--- a/VPhoneKit/VPhoneKit.xcodeproj/project.pbxproj+++ b/VPhoneKit/VPhoneKit.xcodeproj/project.pbxproj@@ -7,10 +7,8 @@objects = {/* Begin PBXBuildFile section */- 5036467F30653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };5036468030653D1000CAADDF /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = AA0000000000000000000181 /* ArgumentParser */; };5036468130653D1000CAADDF /* libVPhoneCoreKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA0000000000000000000031 /* libVPhoneCoreKit.a */; };- 5036468230653D1000CAADDF /* (null) in Frameworks */ = {isa = PBXBuildFile; };5036468330653D1000CAADDF /* LibArchive in Frameworks */ = {isa = PBXBuildFile; productRef = AA0000000000000000000182 /* LibArchive */; };AA0000000000000000000101 /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = AA0000000000000000000181 /* ArgumentParser */; };AA0000000000000000000102 /* LibArchive in Frameworks */ = {isa = PBXBuildFile; productRef = AA0000000000000000000182 /* LibArchive */; };@@ -90,7 +88,6 @@files = (5036468030653D1000CAADDF /* ArgumentParser in Frameworks */,AA0000000000000000000104 /* libVPhoneCoreKit.a in Frameworks */,- 5036467F30653D1000CAADDF /* (null) in Frameworks */,);runOnlyForDeploymentPostprocessing = 0;};@@ -100,7 +97,6 @@files = (5036468130653D1000CAADDF /* libVPhoneCoreKit.a in Frameworks */,AA0000000000000000000105 /* libVPhoneArchiveKit.a in Frameworks */,- 5036468230653D1000CAADDF /* (null) in Frameworks */,5036468330653D1000CAADDF /* LibArchive in Frameworks */,);runOnlyForDeploymentPostprocessing = 0;@@ -497,6 +493,7 @@AA0000000000000000000071 /* Debug */ = {isa = XCBuildConfiguration;buildSettings = {+ ALWAYS_SEARCH_USER_PATHS = NO;ARCHS = arm64;CODE_SIGNING_ALLOWED = NO;MACOSX_DEPLOYMENT_TARGET = 15.0;@@ -508,6 +505,7 @@AA0000000000000000000072 /* Release */ = {isa = XCBuildConfiguration;buildSettings = {+ ALWAYS_SEARCH_USER_PATHS = NO;ARCHS = arm64;CODE_SIGNING_ALLOWED = NO;MACOSX_DEPLOYMENT_TARGET = 15.0;diff --git a/VPhoneKit/VPhoneKit.xcodeproj/xcshareddata/xcschemes/VPhoneArchiveKitTests.xcscheme b/VPhoneKit/VPhoneKit.xcodeproj/xcshareddata/xcschemes/VPhoneArchiveKitTests.xcschemenew file mode 100644index 00000000..753bd52a--- /dev/null+++ b/VPhoneKit/VPhoneKit.xcodeproj/xcshareddata/xcschemes/VPhoneArchiveKitTests.xcscheme@@ -0,0 +1,17 @@+<?xml version="1.0" encoding="UTF-8"?>+<Scheme LastUpgradeVersion="2700" version="1.3">+ <BuildAction parallelizeBuildables="YES" buildImplicitDependencies="YES">+ <BuildActionEntries>+ <BuildActionEntry buildForTesting="YES" buildForRunning="NO" buildForProfiling="NO" buildForArchiving="NO" buildForAnalyzing="YES">+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="AA0000000000000000000015" BuildableName="VPhoneArchiveKitTests.xctest" BlueprintName="VPhoneArchiveKitTests" ReferencedContainer="container:VPhoneKit.xcodeproj"/>+ </BuildActionEntry>+ </BuildActionEntries>+ </BuildAction>+ <TestAction buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.IDEFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES">+ <Testables>+ <TestableReference skipped="NO">+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="AA0000000000000000000015" BuildableName="VPhoneArchiveKitTests.xctest" BlueprintName="VPhoneArchiveKitTests" ReferencedContainer="container:VPhoneKit.xcodeproj"/>+ </TestableReference>+ </Testables>+ </TestAction>+</Scheme>diff --git a/VPhoneKit/VPhoneKit.xcodeproj/xcshareddata/xcschemes/VPhoneCoreKitTests.xcscheme b/VPhoneKit/VPhoneKit.xcodeproj/xcshareddata/xcschemes/VPhoneCoreKitTests.xcschemenew file mode 100644index 00000000..e00d0de3--- /dev/null+++ b/VPhoneKit/VPhoneKit.xcodeproj/xcshareddata/xcschemes/VPhoneCoreKitTests.xcscheme@@ -0,0 +1,17 @@+<?xml version="1.0" encoding="UTF-8"?>+<Scheme LastUpgradeVersion="2700" version="1.3">+ <BuildAction parallelizeBuildables="YES" buildImplicitDependencies="YES">+ <BuildActionEntries>+ <BuildActionEntry buildForTesting="YES" buildForRunning="NO" buildForProfiling="NO" buildForArchiving="NO" buildForAnalyzing="YES">+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="AA0000000000000000000014" BuildableName="VPhoneCoreKitTests.xctest" BlueprintName="VPhoneCoreKitTests" ReferencedContainer="container:VPhoneKit.xcodeproj"/>+ </BuildActionEntry>+ </BuildActionEntries>+ </BuildAction>+ <TestAction buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.IDEFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES">+ <Testables>+ <TestableReference skipped="NO">+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="AA0000000000000000000014" BuildableName="VPhoneCoreKitTests.xctest" BlueprintName="VPhoneCoreKitTests" ReferencedContainer="container:VPhoneKit.xcodeproj"/>+ </TestableReference>+ </Testables>+ </TestAction>+</Scheme>