adhoc app installation failed in iPhone , why?

25,489

Solution 1

Looks as though your provisioning profile is duff in some way. Here's now I normally work around the problem:

  1. Delete your whole build folder. Clean All should do this for you but does seem to leave bits behind from time to time
  2. Check the device ID in the Developer Center. Edit it if you need to.
  3. Download the profile again.
  4. Install the profile again.
  5. Quit Xcode and reload.
  6. Make sure you've set Xcode to use the new, ad hoc profile rather than your developer profile, for the Code Signing Identity of the configuration you will be using for the archive.
  7. Build
  8. Take a copy of the executable straight away

It would be neat if there was some way of finding which step went wrong, but until that happens it's usually best just to start from scratch unless you have very patient (or local) testers.

Solution 2

It appears that the device on which your friend is trying to install your app is not able to validate the application's signature. Basically this means that the provisioning profile you sent to your friend does not match the actual signature (if any) applied when compiling for ad hoc distribution. Try checking the following:

  1. verify that you added a correct Entitlements.plist file to your application.
  2. verify that you added the Entitlements.plist file to your Ad Hoc settings for building the app.
  3. verify that the certificate you are using to sign the application (in your Ad Hoc settings) actually is valid for ad hoc distribution.
  4. verify that you actually built the application using a base sdk related to the device, not the simulator and the Ad Hoc distribution settings.
  5. verify that the provisioning profile you sent is meant for ad hoc distribution and that it includes correctly the device of your friend.

Solution 3

Make sure there are no traces of SVN left behind in the .app package, had the same issue, after removing the hidden SVN directories, everything installed fine hope this helps..

Solution 4

Blimey. It's mid-2014 and XCode 5 is still as infuriating as ever.

What's frustrating is that, even once you've jumped through Apple's new https hoops to create your Ad-Hoc installer, your device might download the installation package, start installing it, silently fail (due to an incorrect/invalid Provision Profile) but then attempt to start downloading & installing again !!

It's only once you go into XCode \ Organiser, and select your device, that you can actually look at the logs and find out that a fatal error occured, have some idea of the cause, and start Googling for a solution. Why the device attempts to retry is beyond me.

And showing that vague "[Your application] could not be installed at this time" error is just misleading. Often, this gives the impression that, ahh, perhaps later, it'll work. Go and have a coffee, and have again after lunch. Errr, no.

Anyway, rambling aside (before I vote myself down), just to say that I had this issue, and the cause what that I was attempting to create an Ad-Hoc (in-house) version of our iPad app, but I had the Production (App Store) version of the Provisioning Profile selected.

I rebuilt the app using the correct "In-house distribution" Provisioning Profile, deployed everything to our intranet, made sure that the .plist file was on a https server (not a http server, otherwise the install would fail with another vague/irrelevant error message), and then it finally worked.

Oh, and I found the tips on this StackOverflow page to be a lifesaver.

Mike

(Off for a lie down. And a beer.)

Share:
25,489
harshalb
Author by

harshalb

iOS Dev

Updated on October 30, 2020

Comments

  • harshalb
    harshalb over 3 years

    I am developing an iPhone application .

    As the application is location aware I am testing it on a different (where I am not present).

    For that I am sending my friend a .mobileprovision profile and the application adhoc build.

    But At his end the application installation stops in between .

    In the device log it gives me the following log :

    2:42:30 unknown mobile_installationd[164] <Error>: 00808800 install_embedded_profile: Skipping the installation of the embedded profile
    Wed Nov 11 12:42:31 unknown mobile_installationd[164] <Error>: 00808800 verify_executable: Could not validate signature: e8008017
    Wed Nov 11 12:42:31 unknown mobile_installationd[164] <Error>: 00808800 preflight_application_install: Could not verify /var/tmp/install_staging.HreENJ/foo_extracted/Payload/RestaurantApp .app/RestaurantApp
    Wed Nov 11 12:42:31 unknown mobile_installationd[164] <Error>: 00808800 install_application: Could not preflight application install
    Wed Nov 11 12:42:31 unknown mobile_installation_proxy[163] <Error>: handle_install: Installation failed
    Wed Nov 11 12:42:31 unknown mobile_installationd[164] <Error>: 00808800 handle_install: API failed
    Wed Nov 11 12:42:31 unknown mobile_installationd[164] <Error>: 00808800 send_message: failed to send mach message of 64 bytes: 10000003
    Wed Nov 11 12:42:31 unknown mobile_installationd[164] <Error>: 00808800 send_error: Could not send error response to client
    

    So can anyone tell me what this error says so the installation fails ?

    I found this is a very common and frustrating problem . And not even one has a perfect solution.

    The apple technical note :http://developer.apple.com/iphone/library/technotes/tn2009/tn2242.html

  • harshalb
    harshalb over 14 years
    first , second and fourth verifications are ok.But for third I am not sure to use "Use Base SDK" or "iPhone Device 3.0" with adhoc distribution settings .Also what can be wrong about the Entitlements.plist file I just have to uncheck the get-task-allow ,isn't it ?
  • harshalb
    harshalb over 14 years
    Hello stephen ,can you tell me should I take the executable from the product section or the executables section . Deleting the whole folder won't make any change to my project ? Atlast what should I choose to build "Use Base SDK" or "iPhone Device 3.0" with adhoc distribution/
  • Massimo Cafaro
    Massimo Cafaro over 14 years
    Yes, you have to uncheck get-task-allow. For your build settings, do the following: set as base sdk the latest possible version, 3.1.2 currently, and set iPhone OS Deployment target to the first possible sdk, 3.0 (because you do not want to allow running on older 2.x devices). Then check carefully that the code signing identity refers to your ad hoc distribution provisioning and that the related AppID is correct: do not forget to set the application identifier according to your AppID in the properties pane of your target.
  • harshalb
    harshalb over 14 years
    where can I find the "iPhone OS Deployment target". ?
  • Massimo Cafaro
    Massimo Cafaro over 14 years
    it is the last setting in the Deployment section.
  • harshalb
    harshalb over 14 years
    So can it be the wild card character in the bundleID like :com.comp_name.*
  • NickG
    NickG over 11 years
    That link links to a site with Malware (according to Google).