XCode fails to deploy iPhone app to iPhone 3GS

北战南征 提交于 2019-12-04 13:06:43

问题


So I built my iPhone app and it runs fine in the simulator so I wanted to deploy it to my iPhone for one last testing round before I go into open beta testing wiht my distribution profile. I did this numerous times already and it has never been a problem. However since the last test run I upgraded both my iPhone (iOS 4) and XCode (Version 4 DP2) so maybe the problem is rooted there.

The build process runs fine and successful - after that XCode tries to deploy it to my iPhone and fails with a simple "An unknown error has occured". Stumped by this I took a look in the system.log and here is what it says:

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

As I am guessing this is a rather uncommon problem (hence the "unknown error") I would be very grateful for any pointers on how to go about debugging this thing. I don't expect a solution or anything (though I would be grateful if anybody encountered a similar problem and helped me out with an exact solution ;)) but maybe some of you have a good idea.

Judging by the two lines in the log stating that there was an error from the device and in the communication with the service agent I am guessing it might be a problem in the connection to the iPhone itself - but seeing that synching with iTunes and all the "normal" stuff works just fine I cannot figure out what that problem might be.

Thanks in advance for helping me on this.

Update

So, after looking around I found this on the device console in the 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

So it seems the iPhone was not able to validate the signature of the code signing. I guess I will re-create some certificates and try again tomorrow. I'll let you know how it turns out.


回答1:


First, look here: http://9mmedia.com/blog/?p=229

Then:

Have you tried re-creating a provisioning profile and re-installing it and then syncing with iTunes? Also, make sure your get-task-allow is checked in Entitlements.plist

From another post:

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.

I've done both of what you described with updating to iOS4 and also XCode4 DP2 (which is awesome by the way), and have not had this issue. Sounds like either a bad install or something got corrupted or misplaced along the way.




回答2:


Xcode 4 is not to be used for distribution builds. You need to build on Xcode 3.2.3 for that.

From the Xcode 4 readme:

PLEASE NOTE: Xcode 4 is beta software. Continue to use Xcode 3.2.x for production development. This release of Xcode 4 is compatible with Xcode 3.2.x project files.



来源:https://stackoverflow.com/questions/3364434/xcode-fails-to-deploy-iphone-app-to-iphone-3gs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!