iPhone 调试:如何解决“无法获取进程任务"? [英] iPhone Debugging: How to resolve 'failed to get the task for process'?

查看:48
本文介绍了iPhone 调试:如何解决“无法获取进程任务"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚向 XCode 添加了一个配置文件(需要支持通知和应用程序购买),根据需要设置临时分发的构建配置,并尝试在设备上运行应用程序(我已经这样做了几次过去,没有任何问题).

I have just added a provisioning profile to XCode (needed to support notifications and in app purchase), setup as needed the build configuration for ad hoc distribution, and tried to run the app on the device (I have done this several times in the past, without any problem).

应用已安装,但未启动.在控制台上,我看到以下消息:

The app is installed, but it does not start. On the console, I see the following message:

Error launching remote program: failed to get the task for process 82.
Error launching remote program: failed to get the task for process 82.
The program being debugged is not being run.
The program being debugged is not being run.

但是,如果我手动启动设备上的应用程序,它会按预期工作.我最近为雪豹安装了最新的 XCode 3.2.这是这个版本的 XCode 的已知错误还是我做错了什么?

However, if I start the application on the device manually, it works as expected. I have recently installed the latest XCode 3.2 for Snow Leopard. Is this a known bug of this version of XCode or am I doing something wrong?

它适用于使用开发配置文件的发行版.我再次检查了临时配置文件以确保它包含我正在使用的设备.

It works fine with release distribution using the development provisioning profile. I have checked again the ad hoc provisioning profile to make sure it includes the device I am using.

推荐答案

当应用程序包含 Entitlements.plist 文件时,我在通过 XCode 在设备上调试二进制文件时遇到问题,而无需安装到设备上进行调试.一般来说,我已经包含了这个文件用于发布版本(App Store 需要它)并删除它以进行调试(因此我可以从 XCode 调试应用程序).这可能是您的问题.

I have had problems debugging binaries on the device via XCode when the app includes an Entitlements.plist file, which is not necessary to install onto the device for debugging. In general, then, I have included this file for release builds (where it is required for the App Store) and removed it for debugging (so I can debug the app from XCode). That may be your problem here.

更新:自(至少)2010 年 8 月(iPhone 4.1 SDK)起,在许多情况下(例如,通过 App Store 分发)不再需要将 Entitlements.plist 包含在您的应用程序中.) 请参阅此处,了解有关权利情况的更多信息.plist 是必需的:

Update: As of (at least) August 2010 (iPhone 4.1 SDK) the Entitlements.plist is no longer necessary to include in your application in many cases (e.g., distribution through the App Store.) See here for more information on the cases when Entitlements.plist is required:

重要提示:通常仅在为 Ad Hoc Distribution 构建或启用 Keychain 数据共享时才需要权利文件.如果这些都不是,请删除代码签名权利中的条目.(强调我的)

IMPORTANT: An Entitlements file is generally only needed when building for Ad Hoc Distribution or enabling Keychain data sharing. If neither of these is true, delete the entry in Code Signing Entitlements. (emphasis mine)

这篇关于iPhone 调试:如何解决“无法获取进程任务"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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