iOS 3.1 how to hook springboard with os 3.1.3?

Discussion in 'iOS Jailbreak & Cydia' started by fntion, Sep 29, 2010.

  1. fntion

    fntion New Member

    Sep 29, 2010
    Likes Received:
    hello,i use xcode3.2,iphone sdk3.2 to test hook springboard ,my friend email me a test code ,witch he test it on sdk3.0 as well.but,when i compile it.there are a few errors here,this is the main code in
    #import <pthread.h>
    #import <SpringBoard/SpringBoard.h>
    #include <substrate.h> 
    extern "C" void Sj99SampleInitialize() {	
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];	
    	// MSHookMessage is what we use to redirect the methods to our own
    	//Check open application and create hooks here: 
    	NSString *identifier = [[NSBundle mainBundle] bundleIdentifier];
        if ([identifier isEqualToString:@""]) {
    		Class $SpringBoard(objc_getClass("SpringBoard"));
    		_SpringBoard$applicationDidFinishLaunching$ = MSHookMessage($SpringBoard, @selector(applicationDidFinishLaunching:), (IMP)&$SpringBoard$applicationDidFinishLaunching$);
        [pool release];
    _SpringBoard$applicationDidFinishLaunching$ = MSHookMessage($SpringBoard, @selector(applicationDidFinishLaunching

    Please Register or Log in to view images

    , (IMP)&$SpringBoard$applicationDidFinishLaunching$);
    take errors as follow:
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/include/substrate.h:16:0 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/include/substrate.h:16: error: too few arguments to function 'void MSHookMessage(objc_class*, objc_selector*, objc_object* (*)(objc_object*, objc_selector*, ...), const char*)'

    what's wrong with my code?plz,your help will be appreciated~

    Please Register or Log in to view images

Share This Page