Reveal配置和使用

1.下载reveal(http://download.csdn.net/download/sinat_28585351/9945878这里提供了破解版)。
2.打开终端
在终端输入$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个别名,意思是:
1)reveal_load_sim 模拟器加载reveal调试用的动态链接库。
2)reveal_load_dev 真机加载reveal调试用的动态链接库。
3)reveal_start 启动reveal调试功能。
4)reveal_stop 结束reveal调试功能。

3.在AppDelegate类的application:(UIApplication *)application didFinishLaunchingWithOptions:方法中打个断点
1) 添加断点,在断点上右击,选择”Edit BreakPoint”.
2) 单击”Action”右边的”Add Action”,然后输入”reveal_load_sim”.
3) 勾选上”Options”上的“Automatically continue after evaluating actions”选项。

然后就可以运行我们运行模拟器了,打开reveal,就可以在reveal界面左上角看到有模拟器可以选择调试,选择它,则可以在reveal中查看调试ios程序的界面了。

关于真机调试
要越狱手机.但是网上也看些教程,如下方法没有尝试过,有兴趣的可以试试,欢迎留言
1)在reveal菜单栏的”Help”->”Show Reveal library in Finder”选项,将libReveal.dylib拖到工程里,Xcode默认将libReveal.dylib设置到”Link Binary With Libraries”,需要我们进行调整,将”Link Binary With Libraries”中的libReveal.dylib删除,再将其添加到”Copy Bundle Resources”下面,然后用Reveal连接真机的方式就和连接模拟器的方式是一样得了.这里需要注意的就是我们要把上面断点处的Action输入的内容从reveal_load_sim改成reveal_load_dev

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值