mirror of
https://github.com/StikDebug/StikJIT.git
synced 2026-10-15 20:10:31 +00:00
Add DDI mount support and document usage requirements (#2)
This commit is contained in:
parent
ee3d5836aa
commit
95b8e4d3f7
5 changed files with 313 additions and 0 deletions
21
README.md
21
README.md
|
|
@ -8,6 +8,8 @@ JIT cannot be enabled in-process, since a process that attaches a debugger to it
|
|||
|
||||
Because it needs a separate process, you call StikJIT from a small app extension that your app launches and hands the target app's PID to (for example over XPC). StikJIT does not include that extension, its launch, or the pairing file; your app provides those.
|
||||
|
||||
The device needs LocalDevVPN connected, and either Wi-Fi or Airplane Mode enabled, before JIT can be enabled or the DDI can be mounted.
|
||||
|
||||
Add `StikJIT.xcframework` to the extension (Embed & Sign), then call it off the main thread:
|
||||
|
||||
```swift
|
||||
|
|
@ -22,6 +24,25 @@ try StikJIT.enableJIT(
|
|||
|
||||
It blocks until done and throws `StikJITError` on failure. Pass `configuration:` to override the tunnel endpoint (defaults to `10.7.0.1:49152`). Pass `script:` to select the bundled JS used to drive the JIT-enabling exchange on devices with TXM — `.universal` (default) or `.legacy` based on your app's needs.
|
||||
|
||||
### Developer Disk Image
|
||||
|
||||
The device must have the personalized Developer Disk Image (DDI) mounted before JIT can be enabled — `enableJIT` will fail otherwise. A mount persists until the device reboots, so it only needs to be (re)done once per boot, not on every launch. Mounting has no dependency on the extension process, so it can be done from anywhere in your app (e.g. on launch or in the background) rather than from the same extension that calls `enableJIT`:
|
||||
|
||||
```swift
|
||||
import StikJIT
|
||||
|
||||
let paths = DDIPaths.default(in: documentsDirectory)
|
||||
|
||||
if try !StikJIT.isDDIMounted(pairingFile: pairingFileURL) {
|
||||
try await StikJIT.downloadDDIIfNeeded(to: paths) { fraction, status in
|
||||
print("[DDI] \(status) (\(Int(fraction * 100))%)")
|
||||
}
|
||||
try StikJIT.mountDDI(pairingFile: pairingFileURL, paths: paths) { fraction in
|
||||
print("[DDI] mounting \(Int(fraction * 100))%")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
[](https://deepwiki.com/StephenDev0/StikJIT)
|
||||
|
||||
## Build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue