provisioning profile hell - iphone

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.

Related

Ad-Hoc Deployment with Xcode 5/iTunes 11

I have a strange problem regarding ad-hoc distribution of an app using iTunes 11.
All settings seems to be OK (provisioning profiles, certificates etc).
I distribute the app from xcode 5, sign it with adhoc certificate and add it to iTunes.
I install the app from iTunes to my device (iPhone 5, IOS 7.0.2) and everything works fine, but when it's complete, the app remains dark gray/shadowed on the device (no load progress circle in middle). If I tap over the app, it will show "Installing..." forever.
This app is an upgrade from an older version, and the older version can be installed with no problems. The major changes were the conversion from non-arc to arc and the xib replacement with storyboard.
Oct 2 16:41:04 Kiphone installd[62] <Notice>: 0x2c3000 handle_install_for_ls: Install of "/var/tmp/com.apple.atc.Apps/com……" requested by atc
Oct 2 16:41:04 Kiphone installd[62] <Notice>: 0x2c3000 MobileInstallationInstall_Server: Installing app com…..
Oct 2 16:41:04 Kiphone installd[62] <Notice>: 0x2c3000 install_application: Installing placeholder
Oct 2 16:41:05 Kiphone installd[62] <Notice>: 0x2c3000 MobileInstallationInstall_Server: Staging: 0.01s; Waiting: 0.00s; Installation: 0.21s; LS Sync: 0.00s; Overall: 0.21s
Oct 2 16:41:11 Kiphone installd[62] <Notice>: 0x241000 MobileInstallationInstall_Server: Installing app com……
B2-4725-AD8B-07C3CCDFB4A9. shouldCommit=1.
Oct 2 16:41:11 Kiphone installd[62] <Error>: profile not valid: 0xe8008012
Oct 2 16:41:11 Kiphone installd[62] <Error>: 0x241000 install_embedded_profile: Could not install embedded profile: 0xe8008012
Oct 2 16:41:14 Kiphone installd[62] <Error>: entitlement 'keychain-access-groups' has value not permitted by provisioning profile 'SSMobile AdHoc CC'
Oct 2 16:41:14 Kiphone installd[62] <Error>: entitlement 'keychain-access-groups' has value not permitted by provisioning profile 'iSS mobile adhoc'
Oct 2 16:41:14 Kiphone installd[62] <Error>: 0x241000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.DTmWby/foo_extracted/Payload/ssmD.app/ssmD: 0xe8008016
Oct 2 16:41:14 Kiphone installd[62] <Error>: 0x241000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.DTmWby/foo_extracted/Payload/ssmD.app
Oct 2 16:41:14 Kiphone installd[62] <Error>: 0x241000 install_application: Could not preflight application install
Oct 2 16:41:15 Kiphone installd[62] <Error>: 0x241000 handle_install_for_ls: API failed
Thank you!
This usually happens because of some reasons I have found:
- check a 100 times if the build is signed with the correct identity and provisioning profile
- if the device is newly added to the portal and the profile, make sure you have downloaded the new profile and added it to Xcode
- try removing the particular profile from the device
- try restarting the device, the computer
- check device logs and especially the installd lines for invalid provisioning profile.
- check if the UDID of the device is correct in the portal (apps show no more the correct UDID on iOS7)
- once on a fresh new install of iOS I had to wait for 5-10 minutes before it got installed and never happened agian.
Hope one of those suggestions helps.

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"

Xcode Build Succeeded but not run on iPhone [duplicate]

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.

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!

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.