安装后 打开iGrimace 会跳转到下面的页面,我想hook,不让执行该跳转。
我的代码
tweak.xm内容
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
%hook AppDelegate
-(BOOL)application:(id)arg1 didFinishLaunchingWithOptions:(id)arg2{
//%orig;
UIAlertView *alert = [UIAlertView alloc] initWithTitle:@"hello first tweak"
message:nil delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alert show];
[alert release];
return YES;
}
- (void)applicationWillResignActive:(id)arg1{
UIAlertView *alert = [UIAlertView alloc] initWithTitle:@"applicationWillResignActive"
message:nil delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alert show];
[alert release];
}
- (void)applicationDidBecomeActive:(id)arg1{
UIAlertView *alert = [UIAlertView alloc] initWithTitle:@"applicationDidBecomeActive"
message:nil delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alert show];
[alert release];
}
- (void)applicationWillEnterForeground:(id)arg1{
UIAlertView *alert = [UIAlertView alloc] initWithTitle:@"applicationWillEnterForeground"
message:nil delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alert show];
[alert release];
}
- (void)applicationDidEnterBackground:(id)arg1{
UIAlertView *alert = [UIAlertView alloc] initWithTitle:@"applicationDidEnterBackground"
message:nil delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alert show];
[alert release];
}
- (void)cxx_destruct{
UIAlertView *alert = [UIAlertView alloc] initWithTitle:@"cxx_destruct"
message:nil delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alert show];
[alert release];
}
- (void)applicationWillTerminate:(id)arg1{
UIAlertView *alert = [UIAlertView alloc] initWithTitle:@"applicationWillTerminate"
message:nil delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alert show];
[alert release];
}
%end
plist内容
如图plist
打开都没效果,好像没hook
已经困了一个星期了,跪求大神啊