0

Can someone tell me how to hook SpringBoard method, like some AppSlider method with iOsOpenDev (iOs 7.1). Also i don't know what framework i have to take.

I have tryed with this but nothing appeared on the console:

import UIKit/UIKit.h
import SpringBoard/SpringBoard.h
import "CaptainHook.h"

CHDeclareClass(SBAppSliderScrollingViewController);

CHOptimizedMethod(0, self, void, SBAppSliderScrollingViewController, loadView)
{
    CHSuper(0, SBAppSliderScrollingViewController, loadView);
    NSLog(@"Ciccia!");
}

CHConstructor
{
   @autoreleasepool
   {
      CHLoadLateClass(SBAppSliderScrollingViewController);
      CHHook(0, SBAppSliderScrollingViewController, loadView);
   }
}
Floppi96
  • 3
  • 2

1 Answers1

0

Why do you need

CHLoadLateClass(SBAppSliderScrollingViewController); //for class available later

you can just write

CHLoadClass(SBAppSliderScrollingViewController);//for class available now ;)

and you can do it easily using Logos.. Here is an Example...

#import <UIKit/UIKit.h>

%hook SBAppSliderController

- (void)loadView {
     %orig;
     NSLog (@"****AppSwitcher Appeared");

     UIAlertView *testAlert = [[UIAlertView alloc] initWithTitle:@"Test" 
     message:@"app switcher appeared." 
     delegate:self 
     cancelButtonTitle:@"OK" 
     otherButtonTitles:nil];

     [testAlert show];
     [testAlert release]; //for non-arc 

}

%end

Note: right class is SBAppSliderController if you need to do something when AppSwitcher Appear ;)

iMokhles
  • 219
  • 2
  • 9
  • I try to replace "CHLoadLateClass" with "CHLoadClass" but it's not working. If i try to make a Logos tweak when i try to build it this is the error that i get : "Undefined symbols for architecture armv7: "_MSHookMessageEx", referenced from: _logosLocalInit() ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)" – Floppi96 Jun 27 '14 at 18:14