在系留iPhone上启动安装的应用程序 [英] Launch installed app on tethered iPhone

查看:84
本文介绍了在系留iPhone上启动安装的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为某些iOS应用程序启动自动化测试解决方案。我正在使用fruitstrap将已编译的应用程序传输并安装到连接的iPhone上,但我很难找到一种在安装完成后自动启动应用程序的方法。

I'm working on trying to launch an automated testing solution for some iOS applications. I'm using fruitstrap to transfer and install a compiled app over to the connected iPhone, but I'm struggling to find a way to automatically launch the application after the installation is complete.

Fruitstrap有一个选项可以在GDB调试器中运行该应用程序。不幸的是,有一些测试用例需要在没有连接调试器的情况下运行应用程序(特殊崩溃处理)。我花了很多时间搞砸MobileDevice Library上可用的资源,这正是Fruitstrap使用的,但是我无法启动应用程序。

Fruitstrap has an option to run the app in the GDB debugger, which works. Unfortunately there are some test cases which will require the app to be run without the debugger attached (special crash handling). I've spent a good amount of time muddling through the resources available on MobileDevice Library which is what Fruitstrap uses, but I haven't been able to turn anything up on launching an App.

任何想法?

推荐答案

创建一个引导程序并使用URL Schemes可能是一些人的选择,当然应该考虑,但它不符合我的要求。

Creating a bootstrap program and using URL Schemes may be an option for some people, and certainly should be considered, but it doesn't fit into my requirements.

我最终做的是通过fruitstrap启动带调试器的应用程序。我重新编译了fruitstrap以包含以下准备命令(在GDB_PREP_CMDS定义中):

What I ended up doing was to launch the app with the debugger through fruitstrap. I re-compiled fruitstrap to include the following prep commands (In the GDB_PREP_CMDS define):

handle all noprint pass nostop
continue

句柄会将信号传递给程序,因此自定义信号处理程序(崩溃处理程序在这种情况)将处理信号。继续是我需要的,以便应用程序在调试器启动时实际运行。

The handle will pass the signal on to the program so the custom signal handler (crash handler in this case) will handle the signal. The continue was something I needed so that the app would actually run once the debugger started.

这有一个不幸的缺陷,不幸的是我不知道解决方法是什么。 ARM7版本的GDB没有像darwin版本那样的set dont_handle_bad_access命令。由于某些原因,将EXC_BAD_ACCESS信号传递给程序不起作用,应用程序挂起。这很重要,因为这是大多数崩溃的信号。但就目前而言,它是我能做的最好的,至少它处理未被捕获的例外。

There is one unfortunate flaw in this, which unfortunately I do not know a workaround for. The ARM7 version of GDB does not have the 'set dont_handle_bad_access' command like the darwin version does. For some reason passing EXC_BAD_ACCESS signals to the program does not work and the app hangs. This is significant since this is the signal for most crashes. But as it stands now, its the best I can do, and at least its handling uncaught exceptions.

这篇关于在系留iPhone上启动安装的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆