为什么仪器不会执行我的 Monotouch 应用程序? [英] Why won't instruments execute my Monotouch application?

查看:21
本文介绍了为什么仪器不会执行我的 Monotouch 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Instruments 来查看我的 Monotouch 应用程序中的资源使用情况.但是,我无法通过 Instruments 启动该应用.

I'm trying to use Instruments to look at resource usage in my Monotouch app. However, I can't get the app to launch through Instruments.

当我点击 Instruments 中的录制按钮时,该应用会在我的 iPhone 上启动,发出嗡嗡声(表示这是一个调试版本),然后崩溃 - 并且 Instruments 报告:

When I hit the record button in Instruments, the app launches on my iPhone, buzzes (signifying it's a debug build), then crashes - and Instruments reports:

Target failed to run: Remote exception encountered : 'Failed to get task for pid 384'

当我直接在手机上启动应用程序时,它运行良好.

The app runs fine when I launch it directly on the phone.

我已经尝试过调试版本和临时版本(使用在 Monotouch 支持页面上定义的参数)一>).始终如一.

I've tried it with debug builds and ad hoc builds (using the parameters defined on the Monotouch support page). Always the same.

我使用的是 Monotouch 3.2.5、iOS 4.3.1(在 3GS 上)、Xcode 4 和 Snow Leopard.

I'm using Monotouch 3.2.5, iOS 4.3.1 (on a 3GS), Xcode 4 and Snow Leopard.

我在网络上的一些地方看到了这个问题,但没有看到解决方案.有大佬知道怎么解决吗?

I've see this issued mentioned in a few places around the web, but haven't seen a resolution. Anyone know how to resolve it?

推荐答案

这是一个签名问题:要在 Instruments 的控制下运行,应用程序是使用 Release 构建设置编译的,而不是 Debug 构建设置,这通常意味着应用程序使用您的分发证书而不是您的开发人员证书进行签名.该应用程序需要使用 Instruments 的开发人员证书进行签名才能对其进行控制.在发布版本上将您的签名选项更改为开发人员,您应该没问题.

It's a signing problem: to run under the control of Instruments, the app is compiled with the Release build settings, not the Debug build settings, which usually means the app is signed with your Distribution certificate instead of your Developer certificate. The app needs to be signed with a Developer certificate for Instruments to be able to control it. Change your signing option to Developer on the Release build and you should be fine.

这篇关于为什么仪器不会执行我的 Monotouch 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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