X-Git-Url: https://git.saurik.com/winterboard.git/blobdiff_plain/77d89d52a33c4a38c3b5b5a59737d3dbfbf92668..af22086e643ffc516d8753facfe6c660ec0b63e8:/Application.mm?ds=sidebyside diff --git a/Application.mm b/Application.mm index 4bfef61..f033c3f 100644 --- a/Application.mm +++ b/Application.mm @@ -46,6 +46,9 @@ #import #import +#include +#include + static NSBundle *wbSettingsBundle; static Class $WBSettingsController; @@ -181,9 +184,17 @@ static Class $WBSettingsController; @end +MSHook(int32_t, NSVersionOfLinkTimeLibrary, const char *name) { + if (strcmp(name, "UIKit") == 0) + return 0x6400000; + return _NSVersionOfLinkTimeLibrary(name); +} + int main(int argc, char *argv[]) { NSAutoreleasePool *pool( [[NSAutoreleasePool alloc] init]); + MSHookFunction(NSVersionOfLinkTimeLibrary, MSHake(NSVersionOfLinkTimeLibrary)); + int value = UIApplicationMain(argc, argv, @"WBApplication", @"WBApplication"); [pool release];