在上一篇博客中提到了Reveal 连接模拟器调试,那么,今天我们来交流下 Reveal 连接真机调试:
在 上一篇博客中,我们 对 eveal_load_sim 这个也许会感到陌生(在断点编辑的时候要设置的)我们在Reveal 连接真机调试 之前来介绍下下面的知识点:
eveal_load_sim – This alias only works when running your app on the iOS Simulator. It loads the libReveal.dylib from the Reveal application bundle (assuming you put Reveal in your system’s Applications folder). If you have Reveal elsewhere change the alias to reflect this.
eveal_load_sim–这个别名只有当应用程序运行在iOS模拟器。它加载的libreveal.dylib从揭示应用程序包(假设你把你的系统的应用程序文件夹显示)。如果你已经揭示了其他地方改变别名,以反映这个。
reveal_load_dev – This alias works when running your app on device or in the iOS Simulator. It however assumes you have added the libReveal.dylib bundled with Reveal to your application’s Copy Resources build phase. (Make sure it is not in your Link Binary with Libraries build phase. Yes, I was fibbing a little about not having to modify your Xcode project. Sorry.
reveal_load_dev–别名工程运行您的应用程序在设备上或在iOS模拟器时。然而,假设你已经添加了捆绑在一起的libreveal.dylib透露给你的应用程序的副本资源建设阶段。确保它不是在你的链接二进制与库建立阶段。是的,我是说一点没有修改你的Xcode项目。对不起的.
reveal_start – This alias posts a notification via NSNotificationCenter to start the Reveal server.
reveal_start–别名张贴通知通过NSNotificationCenter开始显示服务器。
reveal_stop – This alias posts a notification via NSNotificationCenter to stop the Reveal server.
reveal_stop–别名张贴通知通过NSNotificationCenter停止显示服务器。
上面的是百度翻译,也许翻译不准确,理解一下就好
1.要用Reveal连接真机调试,我们需要先把Reveal的动态链接库上传到真机上。由于iOS设备有沙盒存在,所以我们只能将Reveal的动态链接库添加到工程中。
2.点击Reveal菜单栏的”Help”->”Show Reveal Library in Finder”选项(如下图所示),可以在Finder中显示出Reveal的动态链接库:libReveal.dylib
4.之后用Reveal连接真机的方式和连接模拟器的方式类似,我们只需要把上一节提到的断点Action的内容从reveal_load_sim
改成reveal_load_dev
即可。
上述就是用Reveal连接真机的方式
简单明了
但是
-
-
-
-
-
-
-
-
-
我是这么做的 但是 一直显示一个错误(很多博客都是这么写的 但是我不知道为什么会这样)
error: 'reveal_load_dev' is not a valid command.
error: Unrecognized command 'reveal_load_dev'.
谁知道的请留言 介绍下