Skip to content

Commit

Permalink
why
Browse files Browse the repository at this point in the history
  • Loading branch information
jjolano committed Nov 21, 2022
1 parent 3f97549 commit e435541
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions dylib/dylib.x
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@
Shadow* _shadow = nil;
ShadowService* _srv = nil;

HBPreferences* getPreferences(void) {
%group hook_springboard
%hook SpringBoard
- (void)applicationDidFinishLaunching:(UIApplication *)application {
%orig;

[_srv startService];
}
%end
%end

%ctor {
// Load preferences.
HBPreferences* prefs = [HBPreferences preferencesForIdentifier:@"me.jjolano.shadow"];

Expand All @@ -37,22 +47,6 @@ HBPreferences* getPreferences(void) {
@"Hook_Sandbox" : @(NO)
}];

return prefs;
}

%group hook_springboard
%hook SpringBoard
- (void)applicationDidFinishLaunching:(UIApplication *)application {
%orig;

[_srv startService];
}
%end
%end

%ctor {
HBPreferences* prefs = getPreferences();

// Determine the application we're injected into.
NSString* bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
NSString* executablePath = [[NSBundle mainBundle] executablePath];
Expand Down

0 comments on commit e435541

Please sign in to comment.