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

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!

Related

Fastline + Crashlytics Unable to Download App

I have an issue with my App. I have been able to archive it with fastline and to distribute it with Crashlytics.
But then when I install the app I have a pop up with the error : "Unable to Download App" with the option to retry.
I have looked to the device logs, but I don't understand the error :
Jun 7 16:22:50 sherpas-iPhone-6-plus installd(MobileSystemServices)[854] <Notice>: 0x16dff7000
-[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.sherpa-solutions.HIMSS2017; Version=713, ShortVersion=3.5> Jun 7 16:22:50 sherpas-iPhone-6-plus installd(MobileInstallation)[854] <Notice>: <private>:Install (New):0:Success:Begin Jun 7 16:22:50 sherpas-iPhone-6-plus installd(MobileSystemServices)[854] <Notice>: 0x16dff7000
-[MIFileManager realPathForURL:ifChildOfURL:]: Rejecting /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.jQyktL/extracted/Payload/HIMSS2017.app/ActivTouchResources.bundle
-> /Users/jgahide/Library/Developer/Xcode/DerivedData/HIMSS2017-dehtvbvvxajesreqckfuqhvjxfyj/Build/Intermediates/ArchiveIntermediates/HIMSS2017/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/ActivTouchResources.bundle, as absolute symlinks are not allowed
Jun 7 16:22:50 sherpas-iPhone-6-plus SpringBoard[4589] <Info>: Updated: <private> Jun 7 16:22:50 sherpas-iPhone-6-plus installd(MobileSystemServices)[854] <Notice>: 0x16dff7000
__87-[MIFileManager standardizeOwnershipAtURL:toUID:GID:validateSymlinks:removeACLs:error:]_block_invoke: 423: invalid symlink at /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.jQyktL/extracted/Payload/HIMSS2017.app/ActivTouchResources.bundle
Jun 7 16:22:50 sherpas-iPhone-6-plus installd(MobileSystemServices)[854] <Notice>: 0x16dff7000
-[MIInstaller performInstallationWithError:]: Preflight stage failed
I tried Crashlytics with iOS 9 Unable to Download App but it didn't work.

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"

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.

The iPhone “phone” doesn’t have the provisioning profile with which the application was signed

I have tried everything to fix this provision problem and nothing is working. I've reformated my Mac, reinstalled the iPhone, I've also dragged the provisions (developer and distribution) onto the Organizer, iTunes, and Xcode.
In iTunes people say to drag the provisions to the iPhone icon but that doesn't work; it's only able to go under Library (it shows a blue rectangle for me to drop it there). I just have a newly created dummy app with a 57x57 icon. I've also setup the project with the distribution thing with its distribution provision. When I build I get this:
The iPhone “myphone” doesn’t have the provisioning profile with which the application was signed.
Click “Install and Run” to install the provisioning profile “distribution” on “myphone” and continue running “helloworld.app”.
and it has a button "install and run" ive clicked on that hundreths of times and nothing.
in orgranizer I see a tab called Console. I've cleared it and rebuild the app and there is some output that I dont understand. I'm thinking its my problem whats it mean?
Fri Mar 26 11:22:19 unknown misagent[215] <Error>: profile not valid: 0xe8008012
Fri Mar 26 11:22:19 unknown mobile_installationd[206] <Error>: 00808600 install_embedded_profile: Skipping the installation of the embedded profile
Fri Mar 26 11:22:20 unknown mobile_installationd[206] <Error>: 00808600 verify_executable: Could not validate signature: e8008015
Fri Mar 26 11:22:20 unknown mobile_installationd[206] <Error>: 00808600 preflight_application_install: Could not verify /var/tmp/install_staging.NEb61T/helloworld.app/helloworld
Fri Mar 26 11:22:20 unknown mobile_installationd[206] <Error>: 00808600 install_application: Could not preflight application install
Fri Mar 26 11:22:20 unknown mobile_installation_proxy[219] <Error>: handle_install: Installation failed
Fri Mar 26 11:22:20 unknown mobile_installationd[206] <Error>: 00808600 handle_install: API failed
Fri Mar 26 11:22:20 unknown mobile_installationd[206] <Error>: 00808600 send_message: failed to send mach message of 64 bytes: 10000003
Fri Mar 26 11:22:20 unknown mobile_installationd[206] <Error>: 00808600 send_error: Could not send error response to client
Fri Mar 26 11:22:42 unknown misagent[231] <Error>: profile not valid: 0xe8008012
Fri Mar 26 11:22:43 unknown mobile_installationd[206] <Error>: 00809800 install_embedded_profile: Skipping the installation of the embedded profile
Fri Mar 26 11:22:43 unknown mobile_installationd[206] <Error>: 00809800 verify_executable: Could not validate signature: e8008015
Fri Mar 26 11:22:43 unknown mobile_installationd[206] <Error>: 00809800 preflight_application_install: Could not verify /var/tmp/install_staging.6M55Ay/helloworld.app/helloworld
Fri Mar 26 11:22:43 unknown mobile_installationd[206] <Error>: 00809800 install_application: Could not preflight application install
Fri Mar 26 11:22:43 unknown mobile_installation_proxy[235] <Error>: handle_install: Installation failed
Fri Mar 26 11:22:43 unknown mobile_installationd[206] <Error>: 00809800 handle_install: API failed
Fri Mar 26 11:22:43 unknown mobile_installationd[206] <Error>: 00809800 send_message: failed to send mach message of 64 bytes: 10000003
Fri Mar 26 11:22:43 unknown mobile_installationd[206] <Error>: 00809800 send_error: Could not send error response to client
i figured out the problem.
what i did was recreate a dummy project and named the project sample.
then i created a new development and distribution provision and called it sample.
i deleted all the provisions i had currently on my system and added the new ones by selecting both files and dragging it over into the xcode organiser. i also deleted the provision on my iphone by going to settings -> general -> profile -> clicked on remove. then i selected in xcode build -> build and it was successfull. what i was doing was i was a clicking on build and run and whenever i do that i get this error posted above. but when i do a regular build with the device selected in xcode it is 100% sucessfull with no errors. i had to try it in itunes connect to see if the app is sucessfull and i did an upload and it worked!. i cant believe it.
Make sure your Provision profile under Project Settings matches the profiles installed on the iPhone.
Project Settings
Project 201CavTouch201D Info http://img.skitch.com/20100326-ei2k9yha5yknrrcq4hsfgyet7f.preview.jpg
For iPhone
Check the Organizer menu options from the Window Menu of Xcode.
Be sure they match.