美文网首页
Reveal UI 调试工具 使用方法

Reveal UI 调试工具 使用方法

作者: 淡定独行 | 来源:发表于2016-05-18 10:53 被阅读90次

    Reveal 介绍

    Reveal 是一款运行在 Mac OS 上的应用,要调试 iOS应用,开发者要将应用程序与 Reveal 安装的框架层关联。Reveal 会扫描其网络中关联的应用程序,并让开发者选择连接其中之一,当连接到一个应用程序后,Reveal 将显示其 UI,其中包括大量的参数和设置。开发人员现在可以检查 UI 或者更改设置,直到用户界面的外观和行为达到预期目标。目前它尚不支持布局约束,但根据 Reveal 的支持文档来看,这一功能将在未来的版本中发布。Reveal 可以和 iOS模拟器一起使用,也可以用在运行在真机上的应用程序上。另外,Reveal 的安装只需几分钟。
    除了解析出 UI 参数外,Reveal 也会通过一个分解的 3D 视图显示复杂的 UI 层次结构。开发者可以轻松的检查 UI 组件的分层,并在其层次结构中选择特定元素。为了进一步简化调试,也可以仅关注部分 UI,而把其余部分屏蔽起来。

    Reveal 的使用

    • 为工程项目添加 Reveal.framework
      1.打开 Reveal 工具的 Help 菜单找到 Reveal.framework 对应的路径


      「Reveal framework」对应的路径

      2.然后直接拖动他到我们的工程上,这时会弹出对话框,记得勾选「Copy items if needed」

      添加 Reveal.framework
    确保已经加载 Reveal.framework

    3.在工程的「Build Settings」下的「Other Linker Flags」添加「Any iOS Simulator SDK」项,对应的值为「-ObjC」


    修改如上

    4.此时运行项目 出现错误如下:

    Undefined symbols for architecture x86_64:
      "_deflate", referenced from:
          -[IBAHTTPJSONResponse initWithJSONString:compress:] in Reveal(IBAHTTPJSONResponse.o)
      "_deflateEnd", referenced from:
          -[IBAHTTPJSONResponse initWithJSONString:compress:] in Reveal(IBAHTTPJSONResponse.o)
      "_deflateInit2_", referenced from:
          -[IBAHTTPJSONResponse initWithJSONString:compress:] in Reveal(IBAHTTPJSONResponse.o)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    错误提示
    这时我们需要引入 libz.tbd 库,
    引入 libz.tbd 库
    重新运行工程,打开 Reveal 工具,左上角选中我们的工程就可以了

    相关文章

      网友评论

          本文标题:Reveal UI 调试工具 使用方法

          本文链接:https://www.haomeiwen.com/subject/xofwrttx.html