English 中文(简体)
XCode fails to deploy iPhone app to iPhone 3GS
原标题:

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.

最佳回答

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.

问题回答

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.





相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签