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];```
越獄機(jī)器調(diào)試任意app
http://c.blog.sina.com.cn/profile.php?blogid=cb8a22ea89000gtw
首先打開(kāi)Terminal,輸入 vim ~/.lldbinit 創(chuàng)建一個(gè)名為.lldbinit的文件慷暂,然后將如下內(nèi)容輸入到該文件中:
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];
該步驟其實(shí)是為lldb設(shè)置了4個(gè)別名驹闰,為了后續(xù)方便操作定硝,這4個(gè)別名意義如下:
reveal_load_sim 為模擬器加載reveal調(diào)試用的動(dòng)態(tài)鏈接庫(kù)
reveal_load_dev 為真機(jī)加載reveal調(diào)試用的動(dòng)態(tài)鏈接庫(kù)
reveal_start 啟動(dòng)reveal調(diào)試功能
reveal_stop 結(jié)束reveal調(diào)試功能
接下來(lái)皿桑,我們?cè)贏ppDelegate類(lèi)的
application: didFinishLaunchingWithOptions: 方法中,作如下3步操作(如下圖所示):
點(diǎn)擊該方法左邊的行號(hào)區(qū)域蔬啡,增加一個(gè)斷點(diǎn)诲侮,之后右擊該斷點(diǎn),選擇“Edit Breakpoint”箱蟆。
點(diǎn)擊”Action”項(xiàng)邊右的”Add Action”,然后輸入“reveal_load_sim”
勾選上Options上的”Automatically continue after evaluating”選項(xiàng)沟绪。