iPhone调试:如何解决“获取进程任务失败”?
我刚刚向 XCode 添加了一个配置文件(需要支持通知和应用程序内购买),根据需要设置临时分发的构建配置,并尝试在设备上运行该应用程序(过去我已经这样做过几次) ,没有任何问题)。
该应用程序已安装,但无法启动。在控制台上,我看到以下消息:
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.
但是,如果我手动在设备上启动应用程序,它会按预期工作。我最近为 Snow Leopard 安装了最新的 XCode 3.2。这是这个版本的 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.
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?
EDIT: 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(15)
ad-hoc 配置文件不支持调试。您需要使用开发配置文件进行调试,并且仅使用临时配置文件来分发不可调试的副本。
The ad-hoc profile doesn't support debugging. You need to debug with a Development profile, and use the Ad-Hoc profile only for distributing non-debuggable copies.
当应用程序包含 Entitlements.plist 文件时,我在通过 XCode 调试设备上的二进制文件时遇到问题,而无需将其安装到设备上进行调试。一般来说,我会在发布版本中包含此文件(App Store 需要它)并删除它以进行调试(以便我可以从 XCode 调试应用程序)。这可能是你的问题。
更新:(至少)2010 年 8 月(iPhone 4.1 SDK)起,在许多情况下(例如,通过 App Store 分发),不再需要将 Entitlements.plist 包含在您的应用程序中。请参阅< a href="http://developer.apple.com/library/ios/#qa/qa2010/qa1710.html" rel="noreferrer">此处了解有关需要 Entitlements.plist 的情况的更多信息:
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.
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:
我遇到了同样的问题,但通过以下简单的步骤解决了它:
一切顺利。
I Had the same issue, but resolved it by following simple following steps :
All the best.
这花了我一段时间才弄清楚。
如果您使用的是发行版/临时/配置文件,则无法通过 xcode 对其进行测试。您将收到错误:正在调试的程序未运行。
您可以构建应用程序,在 Xcode 中转到应用程序中的产品文件夹,单击包含您的项目名称的文件,然后选择在查找器中显示。您可以将此应用程序拖入 iTunes 并同步,然后您可以在设备上测试您的应用程序。
This took me a while to figure out.
If you are using a distribution / ad hoc/ profile you cannot test it through xcode. You will get the error: The program being debugged is not being run.
You can build the app, go to the products folder in your app in xcode, click on the file with your project name and choose reveal in finder. You can drag this app into into iTunes and sync and that point you can test your app on your device.
如果您收到此类错误,唯一的原因可能是您在 Xcode 中使用了分发配置文件而不是开发配置文件,或者缺少 Entitlement 属性。如果您没有使用 Entitlements.plist,那么唯一可能的错误可能是应用程序正在使用分发配置文件进行打包。您可以通过确认构建日志来验证这一点。要更改此设置,请转到项目的“构建设置”并验证代码签名实体设置。为了进行调试,此设置应该是您当前使用的配置的开发人员配置文件。
https://developer.apple.com/library/ios/#qa/qa1682/_index。 html
要立即获得结果,请从 Xcode 中删除所有移动配置配置文件并安装您想要使用的开发人员配置文件。
If you are getting such error, the only reason could be you using a Distribution profile rather than a development profile in Xcode or a missing Entitlement property. If you are not using the Entitlements.plist, then the only possible error could be the app is getting packaged with a distribution profile. You could verify this confirming the build logs. To change this, go to Build Setting of the project and verify Code Signing Entity setting. For debugging to work, this setting should be a developer profile for the configuration that you are currently using.
https://developer.apple.com/library/ios/#qa/qa1682/_index.html
For instant results, delete all mobile provisioning profiles from xcode and install the developer profile that you intend to use.
这个问题花了将近2个小时!最后我通过替换解决了这个问题
者
iPhone 开发者:调试
CODE_SIGN_IDENTITY
的我不知道它为什么有效,但它确实有效!至少对我来说!
环境:Xcode 5.0 (5A1412)。
Almost 2hrs on this issue! And finally I solved it by replacing the
to
for Debug's
CODE_SIGN_IDENTITY
:I've no idea why it works, but it does! At least for me!
Environment: Xcode 5.0 (5A1412).
检查您的代码签名部分。确保代码签名是 iPhoneDeveloper 代码签名
Check ur code signing section.make sure that the code signing is iPhoneDeveloper code signe
打开 Entitlements.plist 并将布尔值 get-task-allow 设置为 YES - 调试器现在可以附加!
Open Entitlements.plist and set the boolean value get-task-allow to YES - the debugger can attach now!
转到编辑方案并在运行 -> 下信息->构建配置,从 Ad-Hoc 更改为 Debug。单击“确定”保存。
Go to Edit Schemes and under Run -> Info -> Build Configuration, change from Ad-Hoc to Debug. Click OK to save.
您的手机上的开发配置文件可能已过期。
我的开发配置文件几天前过期了,我必须更新它。我在手机上安装了新的配置文件,并在尝试运行应用程序时出现了相同的错误消息。当我查看手机上的个人资料设置时,我注意到过期的个人资料并将其删除。这为我清除了错误。
It might be that you have an expired development profile on your phone.
My development provisioning profile expired several days ago and I had to renew it. I installed the new profile on my phone and came up with the same error message when I tried to run my app. When I looked at the profile settings on my phone I noticed the expired profile and removed it. That cleared the error for me.
当我尝试从 Xcode 启动应用程序时,我收到此错误,因为我认为我只选择了分发配置文件。构建成功,因此我创建了 .ipa 文件。我使用 testflightapp.com 来运行该应用程序。您也可以使用 iTunes。
I received this error when I tried to launch app from Xcode as I figured I had selected distribution profile only. Build was successful so I created .ipa file. I used testflightapp.com to run the app. You can use iTunes as well.
正如 Buffernet 所说,您不能使用分发配置文件进行调试。当我切换到开发人员配置文件时,出现错误“未找到此可执行文件的有效配置文件”。
通过谷歌快速搜索,我找到了下面列出的文章。从那时起,我意识到我没有获得有效的开发配置文件,因为我的 iPhone 尚未添加到配置门户以及所有其他涉及的内容。
确保您运行 iPhone 开发人员配置文件,并且您的设备已添加到配置门户!
http://iosdevelopertips。 com/xcode/a-valid-provisioning-profile-for-this-executable-was-not-found.html
As stated by Buffernet, you cannot use a distribution provisioning profile to debug. When I switched to a developer provisioning profile, I got the error "A Valid Provisioning Profile For This Executable Was Not Found".
A quick google for this lead me to the article listed below. From there, I realised that I hadn't got a valid development provisioning profile as my iPhone hadn't been added to the Provisioning Portal and all the other stuff involved.
Make sure you run an iPhone developer provisioning profile and your device has been added to the provisioning portal!
http://iosdevelopertips.com/xcode/a-valid-provisioning-profile-for-this-executable-was-not-found.html
是的,用于分发目的的配置文件,即Distrutions配置文件不支持调试并给出此错误。只需创建并使用调试配置文件(从developer.apple.com 帐户创建配置文件时请注意这一点)。
Yes , Provisioning profiles which are for distribution purpose, i.e. Distrutions provisioning profiles do not support debugging and gives this error. Simply create and use debug provisioning profile (take care of this when creating provisioning profile from developer.apple.com account).
我刚刚更改了我的bundleIdentifier名称,这似乎成功了。
I just changed my bundleIdentifier name, that seemed to do the trick.
我已经使用 JailCoder http://jailcoder.com/ 修补了我的项目并解决了问题。
只需下载它并将您的 xcode 项目拖到它即可。
I've patched my project with JailCoder http://jailcoder.com/ and problem resolved.
Just download It and drag your xcode project to It.