http://blog.ittybittyapps.com/blog/2013/11/07/integrating-reveal-without-modifying-your-xcode-project/
Open up your favourite text editor, create the file .lldbinit file in your home directory and chuck the following LLDB command aliases into it:
command alias reveal_load_dev expr (void*)dlopen([(NSString*)[(NSBundle*)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2);
command alias reveal_start expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];
command alias reveal_stop expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStop" object:nil];```
越狱机器调试任意app
http://c.blog.sina.com.cn/profile.php?blogid=cb8a22ea89000gtw
首先打开Terminal,输入 vim ~/.lldbinit 创建一个名为.lldbinit的文件,然后将如下内容输入到该文件中:
command alias reveal_load_sim expr (void)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2);
command alias reveal_load_dev expr (void)dlopen([(NSString)[(NSBundle)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2);
command alias reveal_start expr (void)[(NSNotificationCenter)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];
command alias reveal_stop expr (void)[(NSNotificationCenter)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStop" object:nil];
该步骤其实是为lldb设置了4个别名,为了后续方便操作,这4个别名意义如下:
reveal_load_sim 为模拟器加载reveal调试用的动态链接库
reveal_load_dev 为真机加载reveal调试用的动态链接库
reveal_start 启动reveal调试功能
reveal_stop 结束reveal调试功能
接下来,我们在AppDelegate类的
application: didFinishLaunchingWithOptions: 方法中,作如下3步操作(如下图所示):
点击该方法左边的行号区域,增加一个断点,之后右击该断点,选择“Edit Breakpoint”。
点击”Action”项边右的”Add Action”,然后输入“reveal_load_sim”
勾选上Options上的”Automatically continue after evaluating”选项。