《iOS应用逆向工程分析与实战》theos+reveal的例子(53页),由于网络不好,instagram没下载下来,就用自己开发的一个demo程序替代了。但启动demo程序的时候总是看不到效果!麻烦大牛帮忙分下下问题
Tweak.xm文件内容如下:
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import “RevealUtil.h”
%hook AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
%orig; // Call through to the original function with its original arguments.
UIAlertView *alert = [UIAlertView alloc] initWithTitle:@“Hello Tweak”
message:@“I am Wu Tang”
delegate:nil
cancelButtonTitle:@“OK”
otherButtonTitles:nil];
[alert show];
[alert release];
NSLog(@“weak.xm.applicationDidFinishLaunching. NSHomeDirectory : %@”, NSHomeDirectory());
RevealUtil *_reveal = [RevealUtil alloc] init];
[_reveal startReveal];
return YES;
}
Makefile的内容如下:
include theos/makefiles/common.mk
TWEAK_NAME = theosTest
theosTest_FILES = Tweak.xm RevealUtil.m
THEOS_DEVICE_IP = 192.168.1.114
ARCHS = armv7
TARGET = iphone:6.1:4.3
theosTest_FRAMEWORKS = UIKit CFNetwork Foundation
theosMonitor_PRIVATE_FRAMEWORKS = AppSupport
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec “killall -9 ShouJiMiLing”