- Wrap Utils.h's declarations in extern "C" so Tweak.xm/JSI.mm link against
the plain-C symbols Utils.m actually exports, instead of expecting
C++-mangled names that don't exist (confirmed via CI: "Undefined symbols
... showErrorAlert(NSString*, NSString*)").
- Add -undefined dynamic_lookup (matching RainTweak's Makefile): JSI/Hermes
symbols like jsi::JSError's typeinfo only exist in the host process's own
compiled-in runtime once the tweak is actually loaded into Discord, not
anywhere available to link against at build time.
The RCTInstance/-_loadScriptFromSource: + fake-RCTSource hook from the
previous commit was a plausible guess from RN's public source, but
codeberg.org/raincord/RainTweak - an actively-shipping loader for a sibling
Revenge/Bunny fork - proves both the Bridgeless diagnosis correct (its %ctor
refuses to run below Discord v332, i.e. pre-Bridgeless) and shows a cleaner,
verified mechanism: hook RCTHost/-instance:didInitializeRuntime:, let
Discord's own bundle load untouched via %orig, then evaluate Revenge's
scripts directly against the live JSI runtime instead of faking another
bundle load.
- Add Headers/JSI.h + Sources/JSI.mm (ported from RainTweak's JSI.mm):
evaluates NSData as JS or Hermes bytecode directly against a
facebook::jsi::Runtime.
- Add Headers/RCTHost.h declaring the hook target's signature (RN ships no
public header for this internal class).
- Vendor Headers/jsi/{jsi.h,jsi-inl.h,instrumentation.h} - Meta's MIT-licensed
JSI headers, which Theos doesn't provide; RainTweak vendors the same files.
- Rewrite Tweak.x -> Tweak.xm (needs C++ for jsi::Runtime&): runRevengeInjection
now takes a plain data/async execute callback, driven by either the new
RCTHost+JSI hook or the legacy RCTCxxBridge hook (kept as a no-cost
fallback), guarded by a didInject flag so only one path actually injects.
- Makefile: build .xm/.mm sources, add -std=c++17 CCFLAGS matching RainTweak.
Still unverified against a real device, but the mechanism itself is no longer
a guess - it's the one running in a comparable, currently-shipping mod.
- Fix BunnyLog compile error in Sideloading.x (leftover from Bunny->Revenge
rename; only RevengeLog is defined)
- Remove duplicated -loadConfig/+defaultConfig methods in LoaderConfig.m
- Repoint CI's ipa-patcher download at a live mirror with a pinned checksum
(Cristiandis/ipa-patcher was deleted upstream)
- Add a second injection hook on RCTInstance/-_loadScriptFromSource: for
React Native's Bridgeless mode, alongside the existing RCTCxxBridge hook.
Discord's Android build already runs Bridgeless (confirmed via
revenge-xposed's hook targets) and revenge-bundle now pins RN 0.81, which
defaults to it - so the legacy bridge hook this tweak relied on was very
likely dead. Unverified against a real device; see AUDIT.md.
See AUDIT.md for the full iOS-vs-Android comparison and remaining gaps.