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

查看:108
本文介绍了为什么仪器不会执行我的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上启动,嗡嗡声(表示它是一个调试构建),然后崩溃 - 和仪器报告:

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的控制下运行,应用程序编译为发布构建设置,而不是调试构建设置,这通常意味着应用程序使用您的分发证书而不是您的开发人员证书进行签名。
应用程序需要使用Developer的开发人员证书进行签名才能控制它。
在Release版本中将您的签名选项更改为Developer,您应该没问题。

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天全站免登陆