所以我构建了我的 iPhone 应用程序,它在模拟器中运行良好,因此我想在使用我的分发配置文件进行公开 Beta 测试之前将其部署到我的 iPhone 上进行最后一轮测试。我已经这样做过很多次了,从来没有出现过问题。然而,自从上次测试运行以来,我升级了我的 iPhone (iOS 4) 和 XCode (版本 4 DP2),所以问题可能就根源于此。
构建过程运行良好且成功 - 之后 XCode 尝试将其部署到我的 iPhone 并失败,并显示一个简单的“发生未知错误”。对此感到困惑,我查看了 system.log,其中内容如下:
Jul 29 17:44:18 Xcode[12893]: AMDeviceStartHouseArrestService (thread 0x120e8e000): There was an error from the device: ApplicationLookupFailed
Jul 29 17:44:19 Xcode[12893]: call_and_response (thread 0x120e8e000): GOT AN ERROR 0xe800003a
Jul 29 17:44:19 Xcode[12893]: perform_command (thread 0x120e8e000): There was an error communicating with the service agent: 0xe8008001
Jul 29 17:44:19 Xcode[12893]: AMDeviceSecureInstallApplication (thread 0x120e8e000): Could not install package on device: e8008001
Jul 29 17:44:19 Xcode[12893]: Result for ‘/SourceCache/DTDeviceKit/DTDeviceKit-232.24/DTDeviceKit/DTDeviceKit_Utilities.m’ at 468 : 0xE8008001
Jul 29 17:44:19 Xcode[12893]: Result for ‘/SourceCache/IDEiPhoneSupport/IDEiPhoneSupport-45/Classes/DVTiPhoneMobileDeviceIO.m’ at 265 : 0xE8008001
正如我猜测这是一个相当不常见的问题(因此是“未知错误”),我将非常感谢任何有关如何调试此问题的指示。我不期望有解决方案或任何东西(尽管如果有人遇到类似的问题并帮助我找到准确的解决方案,我将不胜感激;))但也许你们中的一些人有一个好主意。
从日志中的两行来看,表明设备和与服务代理的通信出现错误,我猜测可能是与 iPhone 本身的连接出现问题 - 但看到与 iTunes 同步所有“正常”的东西都工作得很好,我不知道问题出在哪里。
预先感谢您在这方面为我提供的帮助。
更新
所以,环顾四周后,我在 XCode Organizer 的设备控制台上发现了这个:
Thu Jul 29 22:40:00 Roberts-3GS SCHelper[38] : 0x104e60 {port = 0x382b, caller = SpringBoard(42):com.apple.preferences, path = /Library/Preferences/SystemConfiguration/preferences.plist}
Thu Jul 29 22:40:22 Roberts-3GS installd[960] : unrecognized status -25293 from codesigning library
Thu Jul 29 22:40:22 Roberts-3GS installd[960] : 00503000 verify_signer_identity: Could not copy validate signature: -402620415
Thu Jul 29 22:40:22 Roberts-3GS installd[960] : 00503000 preflight_application_install: Could not verify executable at /var/tmp/install_staging.0DuNfz/landu.app
Thu Jul 29 22:40:22 Roberts-3GS installd[960] : 00503000 install_application: Could not preflight application install
Thu Jul 29 22:40:22 Roberts-3GS mobile_installation_proxy[961] : handle_install: Installation failed
Thu Jul 29 22:40:22 Roberts-3GS installd[960] : 00503000 handle_install: API failed
Thu Jul 29 22:40:22 Roberts-3GS installd[960] : 00503000 send_message: failed to send mach message of 64 bytes: 10000003
Thu Jul 29 22:40:22 Roberts-3GS installd[960] : 00503000 send_error: Could not send error response to client
看来 iPhone 无法验证代码签名的签名。我想我会重新创建一些证书并明天再试一次。我会让你知道结果如何。
最佳答案
首先,看这里:http://9mmedia.com/blog/?p=229
然后:
您是否尝试过重新创建配置文件并重新安装,然后与 iTunes 同步?另外,请确保在 Entitlements.plist 中选中您的 get-task-allow
摘自另一篇文章:
get-task-allow, when signed into an application, allows other processes (like the debugger) to attach to your app. Distribution profiles require that this value be turned off, while development profiles require this value to be turned on (otherwise Xcode would never be able to launch and attach to your app). <-- Not sure if this last part is true anymore.
我已经完成了您所描述的更新到 iOS4 和 XCode4 DP2(顺便说一句,这很棒)的操作,并且没有遇到此问题。听起来要么是安装错误,要么是某些东西在安装过程中损坏或放错了地方。
关于iphone - XCode 无法将 iPhone 应用程序部署到 iPhone 3GS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3364434/