Dylan Hand Dylan Hand - 4 months ago 137
iOS Question

iOS 8 - Can't Install Enterprise App

Our company has an app that can be downloaded through a website using Enterprise Distribution.

Enterprise Distribution Site

In iOS 8 Beta 5, tapping the download link brings up the expected pop-up "(website) would like to install (App Name)". Tapping 'install' on that dialog first causes the app to get stuck "Waiting..."

App stuck waiting

Until it finally indicates: "Unable to Download App (app name) could not be downloaded at this time."

Unable to Download App

Installing works as expected using iOS 7.

Running the app from Xcode under iOS 8 works.

How do we support Enterprise Distribution iOS 8?

Perhaps a change needs to be made to the Manifest file? When I tried building the app in Xcode 6 Beta 7, the Enterprise Archival process did not prompt me to make a manifest file...

Answer

Looking through the console of the phone whist attempting to install one of my apps, I discovered:

Sep  9 12:16:56 iPhone misagent[94] <Error>: attempt to install invalid profile: 0xe8008011
Sep  9 12:16:56 iPhone installd[40] <Error>: 0x100484000 -[MIInstallableBundle _installEmbeddedProfileInBundle:]: Could not install embedded profile: 0xe8008011 (Expired)

Reasons unbeknown to me, apple invalidated half of my profiles and failed to alert me. After going into developer.apple.com find any invalid profiles:

Hit Edit - > Generate -> Download Rebuild the application with the new profile.

However - The bad news still at least one of my apps is failing to install. Looking through the console gives me nothing. I am convinced this is an apple bug so have filed a radar: 17622725

I hope your issue is a profile problem otherwise we may have to wait until tonight 1800GMT to see if apple have fixed it.

EDIT

With iOS8 GM - I just get Waiting... - I will keep you informed with the bug report progress.

EDIT

After troubleshooting a few of fixes have been found:

Fix 1

As of iOS8, if the images you are linking to in the manifest plist do not exist - Apple will not install the application on the phone - The manifest being the file that you link to on the download page: itms-services://?action=download-manifest&url={url}

Make sure both full-size-image and display-image exist:

<dict>
    <key>kind</key>
    <string>full-size-image</string>
    <key>needs-shine</key>
    <true/>
    <key>url</key>
    <string>https://{path_to_real_image}</string>
</dict>
<dict>
    <key>kind</key>
    <string>display-image</string>
    <key>needs-shine</key>
    <true/>
    <key>url</key>
    <string>https://{path_to_real_image}</string>
</dict>

Fix 2

Enterprise applications will not install if they existed previously on iOS7 due to a bug with iOS8. An error appears in the console:

Ignore manifest download, already have bundleID: {bundle_id}

This can be fixed by temporarily changing the bundleID in the manifest file, but apple are aware as they marked the bug report as duplicated. After internal tests you an also fix the problem by resting the home screen layout General -> Reset -> Reset Home Screen Layout

Fix 3

If you see the application get into the installing... stage as opposed to loading... almost certainly the problem is the embedded provisioning profile has expired, to fix the download you will need to re-archive you application with a new, updated provisioning profile.

Fix 4

If you see the application get to the installing... stage and your provisioning profile is valid - Download the application whilst attached to your console. (Xcode 6 > Window > Devices > Bottom Left Button [v]), You will probably find that the install failed with Verification Stage Failed a little below will be the error message. In my case (Entitlements found that are not permitted by provisioning profile) - For this error goto developer.apple.com and update your App Identifier to include the correct service. For me App Groups needed to be enabled. Then regenerate your provisioning profile