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”選項。