Advertisement
Guest User

AutoHook example code

a guest
Jul 9th, 2018
516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @import UIKit;
  2. #import <Foundation/Foundation.h>
  3. #import "AHookAutoHook.h"
  4.  
  5. @interface HOOKSpringBoard : NSObject <AutoHook>
  6. @end
  7.  
  8. @implementation HOOKSpringBoard
  9.  
  10. + (NSArray *)targetClasses {
  11.     return @[@"SpringBoard"];
  12. }
  13.  
  14. - (void)hook_applicationDidFinishLaunching:(id)fp8 {
  15.     [self original_applicationDidFinishLaunching:fp8];
  16.     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hello!" message:@"I'm an alert that was shown on the SpringBoard by hooking without logos!" delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
  17.     [alert show];
  18. }
  19.  
  20. - (void)original_applicationDidFinishLaunching:(id)fp8 { }
  21.  
  22. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement