From: Jay Freeman (saurik) Date: Tue, 4 May 2010 03:19:25 +0000 (+0000) Subject: Get this all working really everywhere again, seriously this time. X-Git-Tag: v0.9.432~42 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/5d7cc6d52918fbf09b9af24f6165961cae52836f Get this all working really everywhere again, seriously this time. --- diff --git a/Trampoline.t.cpp b/Trampoline.t.cpp index d7853ca..6a87b5d 100644 --- a/Trampoline.t.cpp +++ b/Trampoline.t.cpp @@ -56,6 +56,15 @@ void *Routine(void *arg) { void *(*dlopen)(const char *, int); dlset(baton, dlopen, "dlopen"); + if (baton->dlsym(RTLD_DEFAULT, "JSEvaluateScript") == NULL) + dlopen("/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore", RTLD_GLOBAL | RTLD_LAZY); + + void *(*objc_getClass)(const char *); + dlset(baton, objc_getClass, "objc_getClass"); + + if (objc_getClass("WebUndefined") == NULL) + dlopen("/System/Library/Frameworks/WebKit.framework/WebKit", RTLD_GLOBAL | RTLD_LAZY); + void *handle(dlopen(baton->library, RTLD_LAZY | RTLD_LOCAL)); if (handle == NULL) { baton->dlerror();