reveal 界面调试

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”选项。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 前言 Reveal(https://revealapp.com)是一个iOS程序界面调试工具。使用Reveal,我...
    忻凯同学阅读 1,026评论 0 1
  • 目的 整合Objective-C与Swift写的项目同时支持Reveal调试,本文推荐的调试方法不污染项目,不仅适...
    Hua_san阅读 1,209评论 2 3
  • 图片发自简书App 一、后来我猜,我妈一定是《西游记》看多了,想学孙悟空三打白骨精那一章的画圈法术。只不过孙悟空是...
    妙雨生花阅读 796评论 7 13
  • 登上回北京的飞机,今天我为老公的姥姥送行,送她走完在人间的最后一程。天色灰蒙,家人们悲痛但也平静。牧师祷告...
    kqshan阅读 1,019评论 0 0
  • 一直以来很喜欢冯老先生的书,突然想知道这么有趣和幽默的老先生长什么样子,在我印象里能出现在小学课本的作者大多去世,...
    SOCRATES_2dac阅读 646评论 0 0

友情链接更多精彩内容