• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

iOS - Perfecto Mobile的屏幕共享

用户头像
it1352
帮助1

问题说明

我们正在探索用于移动自动化测试的各种测试套件,并遇到了名为Perfecto Mobile的公司。让我震惊的一个功能是他们能够(没有越狱)在物理iPad上有效地执行远程桌面。

We were exploring various test suites for mobile automated testing and ran into this company called Perfecto Mobile. One of the features that blew me away was they are able to (without jailbreaking) effectively perform a "Remote desktop" on a physical iPad.

因此,iPad的屏幕会在Web应用程序中进行镜像,它可以在Web应用程序上注册触摸/滑动事件并在设备上执行它们。我所拥有的唯一相关技术细节是使用通过USB线发送的命令执行所有这些操作。

So, the iPad's screen is mirrored within a web application, it can register touch / swipe events on the web app and perform them on the device. The only relevant technical detail I have is that all this is being performed using commands sent over the USB cable.

我真的很好奇这是如何实现的和细节相关的私人API(如果有的话)。

I'm really curious as to how this is implemented and details on relevant Private APIs if any.

谢谢,

Teja

Thanks,
Teja

正确答案

#1

我不熟悉PerfectoMobile,但我可以就如何实现这一点给你一些指示:

I'm not familiar with PerfectoMobile, but I can give you a few pointers on how this can be accomplished:

  • For the mirroring, one way would be to look at using AirPlay, the APIs are pretty well documented, but not to do what we're talking about which would require some serious reverse engineering, but it's definitely possible, these guys have done it. A different approach would be to run a background app that would periodically take snapshots of the main screen, and send them over a socket connection to a client. You could do this as a VNC server, and to incorporate the remote view in a web app, you could use noVNC. As far using a USB connection, in the case of the background app talking to a client over TCP, you could to a port forward.

要实际执行触摸事件从远程查看器发送的设备,大多数人一直在使用 GSEvent 功能组来自GraphicsServices私有框架,无需越狱设备。同样,后台应用程序将通过套接字接收诸如点击那里的指令,实例化GSEvent,并将其注入,以便在最前端应用程序的运行循环中处理它。

To actually perform on the device the touch events sent from your remote viewer, most people have been using the GSEvent group of functions from the GraphicsServices private framework without needing to jailbreak the device. Again, a background app would receive over a socket an instruction such as "Tap there", instantiate the GSEvent, and inject it so it gets processed in the run loop of the most front app.

这些少数几种可能性至少已经在iOS 6.1以下的iOS应用程序中成功实现(iOS7是另一种动物)。您不会在App Store中找到任何此类应用程序,因为Apple明确禁止在第三方应用程序中使用私有框架,而是使用Enterprise和ad-hoc配置文件在内部部署它们。然而,在Android上,Play商店中提供了 VMLite

These few possibilities, at least, have been implemented successfully in different iOS apps up to iOS 6.1 (iOS7 is a different animal). You won't find any such app in the App Store, since Apple clearly prohibits the use of private frameworks in 3rd party apps, instead people deploy them in-house using Enterprise and ad-hoc provisioning profile. On Android however, there's VMLite available in the Play Store.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcfigic
系列文章
更多 icon
同类精品
更多 icon
继续加载