From dd448a711d8217fe057f85b051347add2967665a Mon Sep 17 00:00:00 2001 From: 0xBl4nk <61481946+0xBl4nk@users.noreply.github.com> Date: Tue, 21 Oct 2025 16:46:50 -0300 Subject: [PATCH] fix: correct ObjC reference in Frida 17.x compatibility layer Fixes a typo in the Frida version compatibility check where globalThis.Java was incorrectly assigned instead of globalThis.ObjC. This typo caused a ReferenceError when the agent attempted to use ObjC methods on iOS devices running Frida 17.x, specifically when calling env_runtime() and other iOS-specific functions. The fix ensures that when globalThis.ObjC exists (Frida < 17), it is correctly assigned to the ObjC variable instead of Java. Fixes #740 Tested-on: - Frida 17.0.7 - iOS 17.x (jailbroken device) - DVIA-v2 test application --- agent/src/ios/lib/libobjc.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/src/ios/lib/libobjc.ts b/agent/src/ios/lib/libobjc.ts index ce0e2e86..869fbae9 100644 --- a/agent/src/ios/lib/libobjc.ts +++ b/agent/src/ios/lib/libobjc.ts @@ -2,8 +2,8 @@ import ObjC_bridge from "frida-objc-bridge"; let ObjC: typeof ObjC_bridge; // Compatibility with frida < 17 -if (globalThis.ObjC) { - ObjC = globalThis.Java +if (globalThis.ObjC) { + ObjC = globalThis.ObjC } else { ObjC = ObjC_bridge }