Run a virtual iPhone on an Apple Silicon Mac.
Swift
Restart the MIS daemons when an environment update replaces their hook
Lakrce7b42d21f6e
diff --git a/VPhoneDaemon/Daemon/GuestAPI+Environment.swift b/VPhoneDaemon/Daemon/GuestAPI+Environment.swiftindex 85852e4b..ae0e2c12 100644--- a/VPhoneDaemon/Daemon/GuestAPI+Environment.swift+++ b/VPhoneDaemon/Daemon/GuestAPI+Environment.swift@@ -76,6 +76,16 @@ extension GuestAPI {if names.contains("libvcamcaptured.dylib") || names.contains("SystemHook-vphone.dylib") {restarted = stopProcesses(named: "cameracaptured")}+ // Same for the MIS hook: a running daemon keeps the copy it mapped at+ // launch, so replacing the file changes nothing until it restarts.+ // SystemHook is what inserts libmisfix into these, so a new SystemHook+ // matters to them too. SpringBoard is deliberately not in this list —+ // restarting it is a respring, which is `system.respring` to ask for+ // and not something an environment update should do behind the back of+ // whoever is looking at the screen.+ if names.contains("libmisfix.dylib") || names.contains("SystemHook-vphone.dylib") {+ restarted += GuestAPI.udidHookedDaemons.flatMap { stopProcesses(named: $0) }+ }return ["installed": names,"restarted_pids": restarted,