The Loader
Native code that starts Unbound inside Discord.
The loader is Unbound's native part: a tweak on iOS, an Xposed module on Android. It runs Unbound's bundle before Discord's; addon developers don't need it.
At Launch
Each time Discord loads its JavaScript, the loader runs first:
- Read settings.jsonStop here if loader.enabled is false
- Scan addon foldersPlugins, Themes, Fonts
- Run Unbound's bundleThe cached copy
- Run Discord's bundle
The loader never runs plugins. It reads them from disk and hands them to Unbound through UnboundNative, such as UnboundNative.getPlugins() and UnboundNative.getThemes(). Running first lets Unbound hook Metro before Discord defines its modules.
Native Work
| Job | What it does |
|---|---|
| Bundle updates | Downloads a newer bundle in the background, checks signature and hash, uses it next launch. |
| Theme and fonts | Swaps colors and fonts below JavaScript, so native views change too. |
| Crash guard | Turns off an addon after two launches in a row end inside it. |
| Toolbox | The recovery menu works even when Unbound's JavaScript fails. |