Xcode Build Succeeded but not run on iPhone [duplicate] - iphone

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Is it possible to target older iOS versions when using Xcode 4.2 and iOS 5 SDK?
I have a problem that i don't really understood, i'm using Xcode till yesterday and all work perfect, but yesterday i install Xcode 4.2 with iOS 5, but now when I try to do a run with my iPhone set as target is successfully build the application and then Stop immediately. No Errors, nothing in console logs. The application doesn't even copy over to my device.
Xcode says: Building, Running, Finished Running....all within 2 seconds...
On the simulator all works, but on the device nothing happen.
i have xCode 4.2 with iOS 5, and i have an iPhone 3G with io 4.2.1 and under the Deployment target i choose 4.2 like last day. Please help me i'm going crazy!
i see on the organizer window of Xcode, that the log give me this result, i copy a small part:
Sat Oct 15 18:17:14 unknown lockdownd[18] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
Sat Oct 15 18:17:14 unknown com.apple.mobile.lockdown[18] <Notice>: Could not receive size of message
Sat Oct 15 18:17:14 unknown com.apple.mobile.lockdown[18] <Notice>: Could not receive size of message
Sat Oct 15 18:17:14 unknown lockdownd[18] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
Sat Oct 15 18:17:15 unknown com.apple.mobile.lockdown[18] <Notice>: Could not receive size of message
Sat Oct 15 18:17:15 unknown lockdownd[18] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
Sat Oct 15 18:17:16 unknown lockdownd[18] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
Sat Oct 15 18:17:16 unknown com.apple.mobile.lockdown[18] <Notice>: Could not receive size of message
Sat Oct 15 18:17:16 unknown com.apple.mobile.lockdown[18] <Notice>: Could not receive size of message
Sat Oct 15 18:17:16 unknown lockdownd[18] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
Sat Oct 15 18:17:17 unknown lockdownd[18] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
Sat Oct 15 18:17:17 unknown com.apple.mobile.lockdown[18] <Notice>: Could not receive size of message
Sat Oct 15 18:17:17 unknown lockdownd[18] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
Sat Oct 15 18:17:17 unknown com.apple.mobile.lockdown[18] <Notice>: Could not receive size of message
Sat Oct 15 18:17:18 unknown lockdownd[18] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
Sat Oct 15 18:17:18 unknown com.apple.mobile.lockdown[18] <Notice>: Could not receive size of message
Sat Oct 15 18:17:18 unknown com.apple.mobile.lockdown[18] <Notice>: Could not receive size of message
Sat Oct 15 18:17:18 unknown lockdownd[18] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing
What is the problem?
P.S. i try to put the architecture to armv6 and build on the device is that the problem?...but how it's changed?...i have never changed the architecture on Xcode.

you are right - the problem is probably that the 3G runs an amrv6 and you are only building for armv7
in your build settings you find a setting for valid architectures. There should be one entry called armv7
just add another entry armv6 to that setting.
that should do the trick

If you are using xcode 4.2 and want to install the app on to the device follow the steps that HeikoG tell but also after doing this it didn't help me. But at last I figured it out that in info.plist, they have defined "Required device capabilities" in key section, so just delete it and install the application.

There is also another place where you would have to add armv6. Its under the heading Architectures under category Architectures under Build Settings.

Related

ipad/iphone deployment to device via monotouch

I have built 2 apps: one for iPhone, one for iPad. They both build perfectly fine and run within the simulator. They also ran fine on the device prior to updating to Xcode 4.3.2.
When I build to the device with MonoTouch, I get this message:
Please ensure your device is connected...
Connected to: Steve’s iPad
Initializing file service...
Uploading application
Finalizing file service...
Installing application
Installation failed: AMDeviceInstallApplication returned: 0xe8008017
The application was terminated by a signal: SIGHUP
When I look at the console via Xcode/Organizer I see the following messages:
Apr 4 10:22:22 unknown installd[819] <Error>: libMobileGestalt loadBasebandMobileEquipmentInfo: CommCenter error: 1:45
Apr 4 10:22:22 unknown installd[819] <Error>: libMobileGestalt copyInternationalMobileEquipmentIdentity: Could not get mobile equipment info dictionary
Apr 4 10:22:22 unknown com.apple.mobile.lockdown[17] <Notice>: Could not receive size of message
Apr 4 10:22:22 unknown lockdownd[17] <Error>: 010f4000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
Apr 4 10:22:23 unknown installd[819] <Error>: 2ffa4000 verify_signer_identity: Could not copy validate signature: -402620393
Apr 4 10:22:23 unknown installd[819] <Error>: 2ffa4000 preflight_application_install: Could not verify executable at /var/tmp/install_staging.5kF0E7/EastmaniPad.app
Apr 4 10:22:23 unknown installd[819] <Error>: 2ffa4000 install_application: Could not preflight application install
Apr 4 10:22:23 unknown mobile_installation_proxy[818] <Error>: handle_install: Installation failed
Apr 4 10:22:23 unknown com.apple.mobile.lockdown[17] <Notice>: Could not receive size of messageCould not receive size of message
Apr 4 10:22:23 unknown lockdownd[17] <Error>: 2fff5000 handle_connection: Could not receive USB message #7 from mtouch. Killing connection
Apr 4 10:22:23 unknown lockdownd[17] <Error>: 2fef1000 handle_connection: Could not receive USB message #14 from mtouch. Killing connection
Apr 4 10:22:23 unknown installd[819] <Error>: 2ffa4000 handle_install: API failed
Apr 4 10:22:23 unknown installd[819] <Error>: 2ffa4000 send_message: failed to send mach message of 71 bytes: 10000003
Apr 4 10:22:23 unknown installd[819] <Error>: 2ffa4000 send_error: Could not send error response to client
Has anyone else had this issue, or is there anyone out there who is better equipped to decipher the above stack trace?
The crucial part is this:
Could not copy validate signature: -402620393
If you google this error, you will find a number of ideas:
Delete the app manually from the device first, then try to upload again.
Ensure that the provisioning profiles are configured correctly in Xcode. This usually means delete them all and download them again.
I can also throw in a couple ideas of my own:
Check if the same thing happens to a new project from a template. If that works, there is something in your app that's causing the signature validation to fail.
Check if the same thing happens to a new Xcode project (and if it works, try again with your project; Xcode is know to do some automatic configuration in some cases)
Reboot your device and Mac.
If you have another device, try there.
I had the same problem but it turned out to be caused by the Project Options "Executable" setting being set to "Executable with GUI" rather than "Executable"

Unable to connect jailbroken iPhone 3G running iOS 4.2.1 to Xcode for development

I have jailbroken iPhone 3G and recently I've updated the firmware to 4.2.1 (was 3.1.2). Now I'm trying to add this iPhone to Xcode organizer to use it for development. Xcode runs the process of collecting debug information for the device but gets stuck copying file (2 of 2) somewhere about 80%. I switch to Console and see nothing that could relate to the problem. Where can I get more information about what's happeining?
Update:
I've tried to reconnect the device and this time there is multiple lines in Console:
Sun Nov 20 02:13:57 unknown lockdownd[17] <Error>: 2ffea000 handle_connection: Could not receive USB message #6 from DTDKSymbolHelper. Killing connection
Sun Nov 20 02:13:57 unknown com.apple.mobile.lockdown[17] <Notice>: Could not receive size of message
Sun Nov 20 02:13:57 unknown /Developer/Library/Daemons/DTFetchSymbols[1859] <Notice>: Found paths:
Sun Nov 20 02:13:57 unknown /Developer/Library/Daemons/DTFetchSymbols[1859] <Notice>: /usr/lib/dyld
Sun Nov 20 02:13:57 unknown /Developer/Library/Daemons/DTFetchSymbols[1859] <Notice>: /System/Library/Caches/com.apple.dyld/dyld_shared_cache_armv6
Sun Nov 20 02:14:59 unknown lockdownd[17] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from MDCrashReportTool. Killing connection
Googling did not give any results.
Make sure you have an SDK installed on your desktop that supports the iOS version installed on your iPhone. Otherwise, Xcode will not recognize your device. You can also launch Organizer and it will tell you whats going on and if your device (OS) is supported.
Is it possible that you disabled any launchdaemons?
If you disabled an accessory launch daemon then I'm guessing it could affect xcode connecting to the device.
Have you tried to Un-Jailbreak it.

Xcode 4 - My App Is Installed But Never Run On Device

My app builds perfectly, and gets installed onto my iPod Touch 1G (iOS 3.1.3), but when Xcode 4 says it is running it on my device, it never gets started. If I check in the Console for my device in the Organizer, I get the following:
Fri Jul 8 19:23:37 unknown mobile_installationd[4204] <Error>: 0080ba00 install_embedded_profile: Skipping the installation of the embedded profile
Fri Jul 8 19:23:47 unknown SpringBoard[25] <Warning>: Reloading and rendering all application icons.
Fri Jul 8 19:23:56 unknown lockdownd[16] <Error>: (0x837000) spawn_service_agent: Could not look up service in the map
Fri Jul 8 19:23:56 unknown lockdownd[16] <Error>: (0x837000) handle_start_service: Could not spawn the com.apple.debugserver service agent: 515048
Fri Jul 8 19:23:56 unknown lockdownd[16] <Error>: (0x837000) set_response_error: handle_start_service InvalidService
Fri Jul 8 19:24:06 unknown lockdownd[16] <Error>: (0x837000) spawn_service_agent: Could not look up service in the map
Fri Jul 8 19:24:06 unknown lockdownd[16] <Error>: (0x837000) handle_start_service: Could not spawn the com.apple.debugserver.applist service agent: 515048
Fri Jul 8 19:24:06 unknown lockdownd[16] <Error>: (0x837000) set_response_error: handle_start_service InvalidService
Is there anything I can do to fix this, as I cannot debug it on my device at the moment?
EDIT: Never mind. I forgot to try simply rebooting my iPod - I had restarted Xcode, and then my Mac, but did not think to reboot my iPod!
Never mind. I forgot to try simply rebooting my iPod - I had restarted Xcode, and then my Mac, but did not think to reboot my iPod!

provisioning profile hell

once in a while I run across a problem with provisioning a device with a dev version of an app . The error message is usually "a valid provisioning profile for this executable was not found".
I have followed all the Apple instructions: I have a valid dev certificate, the developer provisioning profile includes the device ID of the device in question, codesigning works during build. I have the signing identity set for my developer identity, which Xcode matches up with the development provisioning profile just like it should.
Then, when I try to install the app on the device by doing a 'build/run' in xcode, I get the error described above, and I'm at a total loss. It works just fine on any number of other devices, but for some reason, there are a few devices for which this process bombs.
Here's the console log for the failed install on the device:
Sat Sep 18 11:41:14 unknown SpringBoard[27] <Warning>: Reloading and rendering all application icons.
Sat Sep 18 11:41:36 unknown installd[820] <Error>: 00503000 verify_signer_identity: Could not copy validate signature: -402620395
Sat Sep 18 11:41:36 unknown installd[820] <Error>: 00503000 preflight_application_install: Could not verify executable at /var/tmp/install_staging.pJ8ST8/MyApp.app
Sat Sep 18 11:41:36 unknown installd[820] <Error>: 00503000 install_application: Could not preflight application install
Sat Sep 18 11:41:36 unknown mobile_installation_proxy[855] <Error>: handle_install: Installation failed
Sat Sep 18 11:41:36 unknown installd[820] <Error>: 00503000 handle_install: API failed
Sat Sep 18 11:41:36 unknown installd[820] <Error>: 00503000 send_message: failed to send mach message of 64 bytes: 10000003
Sat Sep 18 11:41:36 unknown installd[820] <Error>: 00503000 send_error: Could not send error response to client
Sat Sep 18 11:42:32 unknown MobileMail[809] <Warning>: SecItemCopyMatching result: -25300
Sat Sep 18 11:42:37 unknown MobileMail[809] <Warning>: SecItemCopyMatching result: -25300
Sat Sep 18 11:43:32 unknown CommCenter[31] <Notice>: com.apple.persistentconnection[MobileMail,809] is releasing its assertion on PDP context 0.
Sat Sep 18 11:44:53 unknown installd[866] <Error>: 00503000 verify_signer_identity: Could not copy validate signature: -402620395
Sat Sep 18 11:44:53 unknown installd[866] <Error>: 00503000 preflight_application_install: Could not verify executable at /var/tmp/install_staging.cgJjHu/MyApp.app
Sat Sep 18 11:44:53 unknown installd[866] <Error>: 00503000 install_application: Could not preflight application install
Sat Sep 18 11:44:53 unknown mobile_installation_proxy[867] <Error>: handle_install: Installation failed
Sat Sep 18 11:44:53 unknown installd[866] <Error>: 00503000 handle_install: API failed
Sat Sep 18 11:44:53 unknown installd[866] <Error>: 00503000 send_message: failed to send mach message of 64 bytes: 10000003
Sat Sep 18 11:44:53 unknown installd[866] <Error>: 00503000 send_error: Could not send error response to client
Team and I ran into same issue as you. It work fine with many device except the customer iPod. We try to create everything from scratch. App ID, Provision, Build. No Luck.
So, after review great article at http://boga.wordpress.com/2008/07/16/debugging-ipod-provision-profilescertificates/
so, I use the Organize to sync provision with iTunes Connect site. then check provision file with TextEdit (Vim).
this line should be appear. After that my deploy with Adhoc success.
<key>Entitlements</key>
<dict>
<key>application-identifier</key>
<string>H33HFFQMS8.icpsstock</string>
<key>get-task-allow</key>
<false/>
<key>keychain-access-groups</key>
<array>
<string>H33HFFQMS8.*</string>
</array>
</dict>
Hope this help, my configuration looks like this.
Target iOS 3.1.3
Base SDK 4.2
LLVM GCC 4.2 Build
get-task-allow in Entitlement.plist must be false
Sync Organizer's provision with iTunes Connect
You might want to try the whole provisioning process from the beginning again. Yesterday, the XCode managed "automatic" provisioning profile gave me that error when I try to test on a new iPhone. So I had to resolve to the old manual installation of provisioning profile.
I deleted all my profiles from both the device and the XCode. Added the new device to the provisioning profile on the iOS provisioning portal on the apple website. (I think I also closed XCode and restarted my machine.) Re-downloaded the new profile and installed to the XCode. Changed to that profile in the project setting. And it worked.
The only thing that I didn't do was regeneration of the certificate.

Renaming project gives med code signing error

I just renamed my project and also in the project.pbxproj renamed my product to the new name.
Now I am getting codesigning error when trying to debug on the phone. How come and how do I fix this? I have defined the profile to the same as on my phone for "debug"-ing.
It works well on the simulator. It didn't work before changing the product name either. I have also cleared the file history.
Inlcuding the log here:
Fri Jul 30 12:51:36 unknown SpringBoard[28] <Warning>: Killing <SBApplication:0x6343510> com.iAndApp.BlockPop activate: deactivate: for app installation
Fri Jul 30 12:51:37 unknown SpringBoard[28] <Warning>: Reloading and rendering all application icons.
Fri Jul 30 12:51:42 unknown com.apple.debugserver-48[2630] <Warning>: debugserver-48 for armv6 Copyright (c) 2007-2009 Apple, Inc. All Rights Reserved.
Fri Jul 30 12:51:42 unknown com.apple.debugserver-48[2630] <Warning>: Connecting to com.apple.debugserver service...
Fri Jul 30 12:51:42 unknown kernel[0] <Debug>: lockbot[2617] Builtin profile: debugserver (sandbox)
Fri Jul 30 12:51:44 unknown SpringBoard[28] <Notice>: MultitouchHID(20af30) uilock state: 1 -> 0
Fri Jul 30 12:51:44 unknown SpringBoard[28] <Notice>: MultitouchHID(2277a0) device bootloaded
Fri Jul 30 12:51:45 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.iAndApp.BlockPop[0x5ab4]) Spawned and waiting for the debugger to attach before continuing...
Fri Jul 30 12:51:45 unknown com.apple.launchd[1] <Error>: (UIKitApplication:com.iAndApp.BlockPop[0x5ab4]) posix_spawn("/var/mobile/Applications/CB93DCE9-6063-4486-9E48-E502D748CC3A/BlockPop.app/BlockPopLite", ...): Permission denied
Fri Jul 30 12:51:45 unknown SpringBoard[28] <Warning>: Unable to obtain a task name port right for pid 2631: (os/kern) failure
Fri Jul 30 12:51:45 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.iAndApp.BlockPop[0x5ab4]) Exited with exit code: 1
Fri Jul 30 12:51:45 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.iAndApp.BlockPop[0x5ab4]) Throttling respawn: Will start in 2147483647 seconds
Fri Jul 30 12:51:45 unknown SpringBoard[28] <Warning>: Application 'BlockPopLite' exited abnormally with exit status 1
Fri Jul 30 12:52:15 unknown com.apple.debugserver-48[2630] <Error>: error: failed to lookup the process ID for CFBundleIdentifier com.iAndApp.BlockPop.
Fri Jul 30 12:52:15 unknown com.apple.debugserver-48[2630] <Warning>: error: failed to launch process (null): unknown error.
Fri Jul 30 12:52:15 unknown com.apple.debugserver-48[2630] <Warning>: 1 [0a46/1403]: error: ::read ( 6, 0x3809f4, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Fri Jul 30 12:52:45 unknown SpringBoard[28] <Notice>: MultitouchHID(20af30) uilock state: 0 -> 1
Thanks in advance!
Niklas
Well, I did as many other did, I recreated the project and moved the content to the new project. Some lessons learned that may be valuable for others:
First, I tried to create an empty project and then copied all content by just dragging the files (classes, sound files, xib files, etc.). That didn't work, complaints about that it couldn't load the files. May also have to do with that I changed name of the project earlier, that's actually when all problems started.
I created a new project that's window-based. Could be my incompetence, but I didn't manage to get the first view loaded properly and, hence, ended up with a grey first view. I created all files and xibs and copied the code from to the newly created class files. I copied/pasted all graphical objects in my xib and configured everything as they're supposed to be (class associations, actions, outlets, etc).
I created a new view-based application with exactly the name I was going to use for my app. By doing this I get the delegate AND controller file for free, and I was hoping that some of the assocations I failed to do was going to come for free now. Differently from 2 above, I now added my files by rigth-clicking on Classes/Other Resources/etc.->Add->Existing Files. The only thing I dragged from my old project was png-files. I cannot really explain why, but I guess that some associations happens behind the scenes when xCode creates the delegate and controller files which I couldn't controll when creating a windows based project, due to my incompetence or how xCode works.
Cheers,
Niklas
I had a similar problem. The Console log showed:
Mon Dec 6 10:43:46 (deviceName) com.apple.launchd[1] (UIKitApplication:(appId)[0x7f1b][2763]) : ((appId)[0x7f1b]) posix_spawn("/var/mobile/Applications/427DC185-7DD3-4286-B73E-9B650798A37D/(appName).app/CO", ...): Permission denied
This only occurred when running/debugging with XCode debugger. The app would not crash when launching from the launcher.
I tried reinstalling certificates with no success.
It appeared to me that the problem was with the debugger connecting.
I deleted the application, and on the next run/debug with XCode the problem had gone away!
I am using this script to rename my iOS project. https://github.com/ytbryan/rename
Remember to update your Xcode scheme too.