You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: INTEGRATION.md
+46-13Lines changed: 46 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ This guide separates two different jobs:
9
9
-**Part 1: Add iOS 26 JIT support** changes the app's JIT memory allocator so it can cooperate with a script where TXM/SPTM is present.
10
10
-**Part 2: Integrate StikDebug and StikJIT** adds the StikDebug URL scheme and optional Built-in StikJIT to an app that already works with iOS 26 JIT and manual StikDebug activation.
11
11
12
-
If the app already enables JIT successfully after the user manually selects it and its script in StikDebug, skip Part 1. Record the script filename and complete Part 2. Part 2 does not require changing a working JIT allocator.
12
+
If the app already enables JIT successfully after the user manually selects it and its script in StikDebug, skip Part 1. Record whether it uses `universal.js`, `legacy.js`, or a custom script file, then complete Part 2. Part 2 does not require changing a working JIT allocator.
13
13
14
14
If the app does not already have script-based iOS 26 JIT, complete Part 1 first and then Part 2.
15
15
@@ -56,11 +56,9 @@ Use this order where TXM/SPTM is present:
56
56
57
57
Preallocate executable regions before detaching. A region introduced later cannot be prepared by a script that has already detached; reconnect and repeat the protocol if the engine must add one.
58
58
59
-
## Keep the legacy protocol only for backward compatibility
59
+
> **Note:** We keep legacy script support only for backward compatibility with existing applications. If you are adding JIT support to an app now, use the universal script.
60
60
61
-
The legacy script is retained only for existing engines that stop once at `brk #0x69` with the RX address in `x0` and its length in `x1`. It prepares that region, advances the program counter, and detaches. Do not build new integrations around `legacy.js`; implement the universal protocol instead.
62
-
63
-
After Part 1 works with the matching script in StikDebug, continue with Part 2. The chosen script filename is developer-controlled and must not become a user setting.
61
+
After Part 1 works with the matching script in StikDebug, continue with Part 2. The chosen script is developer-controlled and must not become a user setting.
64
62
65
63
# Part 2: Integrate StikDebug and StikJIT into an existing iOS 26 JIT app
66
64
@@ -69,7 +67,9 @@ Part 2 assumes all of the following already work:
69
67
- The app can wait for an external debugger and detect when JIT is ready.
70
68
- The app's JIT allocator implements its iOS 26 breakpoint and executable-region protocol.
71
69
- JIT works when the developer or user manually selects the app and matching script in StikDebug.
72
-
- The developer knows which script filename the app requires, normally `universal.js`.
70
+
- The developer knows whether the app requires `universal.js`, `legacy.js`, or a custom script file.
71
+
72
+
If the app currently uses `legacy.js`, we recommend switching it to the universal method, but this is not required to complete Part 2.
73
73
74
74
Part 2 preserves that existing **Wait for Debugger** path and adds automatic StikDebug URL launching and optional Built-in StikJIT. It does not change the app's JIT allocator or script protocol. If any prerequisite above is missing, complete Part 1 first.
75
75
@@ -262,7 +262,7 @@ try StikJIT.enableJIT(
262
262
)
263
263
```
264
264
265
-
Use `.universal`for new integrations. Use `.legacy`only when preserving an existing `legacy.js` ABI, or `.custom(URL)` for another established protocol. A custom script must be readable from the helper-extension process. Keep that selection in backend code and use the corresponding filename in the StikDebug URL. Do not expose script selection to the user. The user-facing `forceScript` toggle only bypasses TXM detection and runs the developer-selected script regardless.
265
+
Use `.universal`or `.legacy`for the corresponding bundled script, or `.custom(URL)` for another established protocol. A custom script must be readable from the helper-extension process. Keep that selection in backend code. For StikDebug requests, send the matching built-in filename for universal or legacy, or send the base64-encoded contents of a custom script. Do not expose script selection to the user. The user-facing `forceScript` toggle only bypasses TXM detection and runs the developer-selected script regardless.
266
266
267
267
### When the user resets the cache
268
268
@@ -286,10 +286,16 @@ Route all three choices through the same host-side coordinator. Check `get-task-
286
286
287
287
For **Wait for Debugger**, keep the app's existing waiting and readiness behavior. Where TXM/SPTM is present, it must continue through the existing breakpoint protocol before reporting success; an ordinary debugger attachment without the correct script is not sufficient.
288
288
289
-
For **StikDebug**, construct the URL with `URLComponents` and include the bundle ID, current PID, and the developer-selected script filename:
289
+
For **StikDebug**, always construct the URL with the bundle ID and current PID. If TXM/SPTM is present, also send the developer-selected script. Use `script-name=universal.js` or `script-name=legacy.js` for the scripts bundled with StikDebug. For any other script, base64-encode the file contents and send them as `script-data` instead. When TXM/SPTM is not present, omit both script parameters because debugger attachment alone enables JIT.
Use `universal.js` for new integrations. Specify `legacy.js` only for an app that already implements the legacy ABI, or another installed script for an established custom protocol. Keep this choice in developer-controlled backend code and do not expose `script-name` as a user setting. StikDebug uses the PID to target the running process and the bundle ID to identify and return to the app.
347
+
Send custom scripts through `script-data`; do not require users to install them in StikDebug. Keep script selection in developer-controlled backend code and do not expose it as a user setting. Resolve TXM/SPTM presence before building the request rather than treating an unknown result as absent. StikDebug uses the PID to target the running process and the bundle ID to identify and return to the app.
317
348
318
349
If the app checks whether StikDebug is installed with `canOpenURL`, add this to its `Info.plist`:
319
350
@@ -385,15 +416,17 @@ After completing Part 1, Part 2, or both, please get in touch with us in the [id
385
416
386
417
## All methods
387
418
388
-
-[ ] New iOS 26 integrations implement the universal protocol; legacy is used only for backward compatibility.
419
+
-[ ] New iOS 26 integrations implement the universal protocol.
389
420
-[ ] The host checks its own `get-task-allow` before starting JIT acquisition.
390
421
-[ ] The selected script matches the app's breakpoint protocol and is not user-configurable.
391
422
-[ ] Where TXM/SPTM is present, executable-region preparation succeeds before the workload starts.
392
423
-[ ] Settings offer one mutually exclusive JIT method selection and start only that method.
393
424
394
425
### StikDebug
395
426
396
-
-[ ] The URL includes bundle ID, current PID, and the developer-selected `script-name`.
427
+
-[ ] The URL always includes bundle ID and current PID.
428
+
-[ ] Where TXM/SPTM is present, the URL includes `script-name` for universal or legacy, or base64-encoded `script-data` for a custom script.
429
+
-[ ] Where TXM/SPTM is not present, the URL omits both script parameters.
397
430
-[ ]`stikdebug` is in `LSApplicationQueriesSchemes` if the app calls `canOpenURL`.
398
431
-[ ] The app does not treat successful URL opening as successful JIT acquisition.
399
432
-[ ] Inside LiveContainer, the app tells users to enable **Use LiveContainer's Bundle ID**.
0 commit comments