27

I am getting this error when trying to install an app to a device. I've been dealing with code signing errors for the last 3 days, and now this.

My app is using a distribution certificate and mobile provisioning profile. It is uploaded to a build server where it is passed as a successful build with no code signing errors. The server generates an application download link which I am using on my device to download the app, where I am getting the error:

Unable to download application, <app-name> could not be installed at this time

  • My app is using a valid distribution certificate
  • My app is using a valid distribution provisioning profile
  • The build server passed the app with no code signing errors

From what I understand, the app should be able to run on any device as it is using the distribution certificate and profile. Other apps that I've worked on work fine with this method. Does anyone have a clue why my app can't be installed?

Logan Serman
  • 29,447
  • 27
  • 102
  • 141

16 Answers16

39

Most common causes of this issue:

  • Device storage is full
  • The provisioning profile is a developer provisioning profile
  • The ad hoc distribution provisioning profile is corrupted and the device is having an issue with it.
  • The device was restored from a backup and is causing a conflict for over-the-air distribution
  • There was a network timeout
  • Architecture settings of the build and the device are incompatible ( can sometimes happen when "Build Active Architecture Only" is on when building).
  • Not Using Mobile Safari.

To find out the exact cause of this issue:

  • Connect the device with iMac.
  • Open Organizer then choose devices.
  • Choose your Connected device from sidebar.
  • Choose Console inside the chosen device.
  • Now install the app it will show the exact cause of problem

Reference

Community
  • 1
  • 1
Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241
  • I did the steps to find the exact cause, but in my case the console showed the exact same message with some other worthless information. It ended up being that the plist file was pointing to the wrong url, but there was no indication at all the url was the issue. – Reimius Aug 12 '14 at 18:05
  • Interesting ! Most of the time console messages will help you pinpoint the issue ! Anyway you found the problem that's great ! Can you show me what's the log console showed during this problem ? and by the way one more doubt you stored the URL in Info.plist and used that to make API call but that failed that is what crashed the app huh ! I am asking to elaborate because it will help others find the answer easily :) – Durai Amuthan.H Aug 13 '14 at 05:47
  • 1
    My hope was this "Now install the app it will show the exact cause of problem" but with everything from Apple to developers, there is no help coming from there. – Duck Apr 06 '15 at 17:36
  • @SpaceDog - Yes apple wants to find it out on our own :) – Durai Amuthan.H Apr 07 '15 at 05:30
  • I had this problem, the console shows: `itunesstored[8000] : [ApplicationWorkspace]: Installing software package with bundleID: com.domain.appname; File starts with 0x3c21444f; expected 0x504b0304 Nov 21 19:32:53 testiphone itunesstored[8000] : BundleValidator: Invalid archive for bundlerIdenfier: com.domain.appname path:` can you tell what it means? is it a wrong profile? – ziggurism Nov 22 '15 at 00:46
  • The problem was my manifest was pointing to the directory containing the ipa, rather than the ipa itself. It was finding a directory where it expected an .ipa file. – ziggurism Nov 22 '15 at 13:23
  • iOS10 device log sucks, too much noise. I was able to find the log I was looking for eventually. Turned out I was using an old distribution cert, so I deleted it and installed the new distribution cert. Should be roses now. – Pellet Dec 15 '16 at 07:05
  • I see things like "Failed to unhide archs in executable", and other things in the console that I don't know what means (it spits out hundreds of lines of code the second or two from I click "install" and it shows the error message. – Svend Hansen Jan 17 '17 at 15:07
  • 1
    In my case point number 3 of Most common causes was the reason. – Jayprakash Dubey Apr 21 '17 at 13:45
  • 1
    @DuraiAmuthan.H, thanks for your solution. Here are the step updates as of Xcode 10: Connect the device with iMac. * Open Xcode and select Window -> Devices and Simulators from the menu * Choose your Connected device from sidebar. * Choose [Open Console] inside the chosen device. * Now install the app it will show the exact cause of problem – Native_Mobile_Arch_Dev Sep 17 '18 at 15:51
  • yeah the "Build Active Architecture Only" was my problem, if you are trying to install on an iPhone 5 or lower, this could be your problem since they are not arm64 devices like most – Fonix Feb 05 '19 at 08:38
7

Is your app build with a valid enterprise/in-house distribution profile/certificate?

If so: Attach the device to your mac and start xcode. Then open the organizer (CMD + SHIFT + 2) and read the device's console while installing the app. Maybe that clears things out

bzlm
  • 9,626
  • 6
  • 65
  • 92
basvk
  • 4,437
  • 3
  • 29
  • 49
4

Make sure your iOS version is compatible with the app you are installing.

I saw this issue happen when a user was installing an iOS 8 only app on an iOS 7 device.

Also, if you tried to install the application on iOS 7 and it failed due to being an incompatible version and then you upgraded to iOS 8, you will need to do the following:

  1. Download iExplorer (http://www.macroplant.com/iexplorer/)
  2. Plug your device
  3. Delete all the files in "Media > Downloads"
  4. Restart device

There's an iOS bug where it leaves behind the bundle ID and it will fail silently not allowing you to install the app after you upgrade.

Fostah
  • 2,947
  • 4
  • 56
  • 78
2

Had this problem lately and went nuts. Settings for iOS version, device type (iPhone, iPad) were correct... still the app wouldn't download/install.

A simple reboot fixed it!

robro
  • 1,730
  • 23
  • 26
1

Apple really needs to work on provisioning files.

In the docs, it says that the app must firstly be signed with the development provisioning profile and then the distribution provisioning profile upon archival of the file for distribution. However, I found it to work by using the development provisioning file for both the code signing and archival signing instead.

You really need to play around with the provisioning files and see which works for you.

max_
  • 24,076
  • 39
  • 122
  • 211
  • I think the archiving and distribution is done by the build server. I just commit the app and it spits out a download link. I don't do any archiving at all... but this server builds apps all of the time and has never had an issue except with this app. – Logan Serman Sep 17 '12 at 16:11
  • Hmm ok, have you considered that it could be a problem with the build server? It is definitely a problem with the provisioning though. – max_ Sep 17 '12 at 16:47
  • Build server looks fine, just finished looking at all of that stuff. Must have the wrong provisioning I guess, even though I just downloaded it from the developer portal... – Logan Serman Sep 17 '12 at 17:06
  • In the organizer it says "Valid profile" with a green checkmark next to the profile I am using. My certificates are all good too. Is there a way to test if a profile is bad? Maybe the profile is not matched up with the certificate? How do I check these things? – Logan Serman Sep 17 '12 at 17:08
  • If you're using the distribution provisioning profile on the build server, try replacing it with the development profile and see if that works. – max_ Sep 17 '12 at 17:08
  • In the iOS Provisioning Portal, the profile I am using is listed under "Provisioning Profiles" for the certificate I am using. I have already tried using the development profile and it does not work. Not to mention other apps use this same certificate/profile combo and work just fine. – Logan Serman Sep 17 '12 at 17:10
  • When I add the dev profile it says "Valid signing identity not found". For the distribution profile, it says "Valid profile". – Logan Serman Sep 17 '12 at 17:11
1

For me this error occurred when i distributed my app as inHouse App,

The reason for the error was while exporting ipa file i used the option
save for Ad Hoc Deployment but it actually should be save for Enterprise Deployment

And also from iOS 10 you need to give some string for permission eg, For "Privacy - Camera Usage Description" add string as "This app requires access to the Camera."

Ariven Nadar
  • 1,278
  • 13
  • 13
1

Finally and after a lot of trouble I was able to fix this issue.

I'm working with Xamarin. The issue appeared after enabling push notifications for my app causing the provisioning profiles to become damaged.

I unchecked push notifications from entitlements.plist (doesn't disable push notifications)

I was cleaning the project and removing profiles all the way

Ahmed Elashker
  • 1,001
  • 1
  • 8
  • 17
1

You may be able to determine a problem with the .IPA by attempting to upload it to iTunes Connect and observing if it disallows the upload during validation (ignoring any errors regarding missing images/assets required for the store).

In my case, a Xamarin app that was deployed via HockeyApp was getting the error. Since I wasn't developing the project in Xcode, I used the Application Loader to attempt to upload the IPA to iTunes Connect. The validation failed, with an error regarding a missing required setting in the info.plist. Once I addressed this, I re-deployed via HockeyApp and the app was able to run.

Instructions for Application Loader can be found here: https://help.swiftic.com/hc/en-us/articles/201574452-Upload-Your-App-to-iTunes-Connect-using-the-Application-Loader

Dave Kidder
  • 1,758
  • 13
  • 16
0

Well, I had this issue previously. I would follow the suggestions by @max_ first. But, as trivial as this might sound, make sure that the plist file associated with your .ipa has a proper case in its hyperlink for the ipa. It is case-sensitive.

Ravi
  • 7,929
  • 6
  • 38
  • 48
  • Where is this located in plist exactly? – Logan Serman Sep 17 '12 at 15:35
  • Before I answer, I assume you are using enterprise distribution and that the app is hosted on your enterprise servers. If that is the case, every ipa has a plist associated, which has the link to the "file" (that is the ipa) and some associated information in the form of a plist. The plist's example can be seen here: `http://hectorramos.com/automating-ios-over-air-beta-deployment/`. Make sure `${APPLICATION_NAME}.ipa` has accurate case. – Ravi Sep 17 '12 at 15:40
  • I think the build server takes care of running those scripts. I'll have to take a look at that and make sure it is generating the correct ones. – Logan Serman Sep 17 '12 at 16:37
  • @LoganSerman I'm pretty sure that theres another error if the .ipa file cannot be found. Also, it wouldn't download the app unless the .ipa was there. – max_ Sep 17 '12 at 16:46
  • The .ipa is there. By "generating the correct ones" I mean the values for `${APPLICATION_NAME}` and the other values that article mentions. – Logan Serman Sep 17 '12 at 16:56
  • Well, if a build server creates the plist, it wouldn't hurt to open the app download page in a laptop web-browser, view the source to open the plist to see if the values are correct :-) – Ravi Sep 17 '12 at 18:42
0

In .plist file

do your URL tag include http://

If you fill in URL tag with "www.somelink.com/....." it will download but get message "Unable to download at this time"

You Should fill in "http://www.somelink.com/...."

also in Display-image & Full-Size Image

Popeye
  • 11,839
  • 9
  • 58
  • 91
0

I think I've had a case just like yours with xcodebuild. You might want to check that the bundle identifiers are exactly the same (case-sensitive!) in you build settings and on Apple developer portal (and thus in the provisioning profile)

You will find a more detailed write up and more fix options here.

Community
  • 1
  • 1
Leon Deriglazov
  • 1,132
  • 9
  • 13
0

Sometimes you just need to delete all apps with has the same bundleId. In my case, I had an app which was installed from the code and after configuring CI I was not able to install builds from CI. The fix was just to delete an app which was installed from Xcode.

Sapozhnik Ivan
  • 235
  • 3
  • 7
0

For those ones using dropbox for https download jus check that the link is the right one... I forgot to use the right format like this one https://dl.dropboxusercontent.com/s/xxxxxxxxxxxxx/appname.ipa you should not use www.dropbox.com....... I just changed this and it was working great

Alez
  • 1
  • 1
0

In our case, our distribution profile had expired. Check it in your Apple Developer/Member Center.

Marc
  • 13,011
  • 11
  • 78
  • 98
0

My app's code signing and provisioning profile was fine too. However I fixed the problem from occurring on iOS10 devices by removing it's embedded app extensions. They did not have valid certificates but were not detected as invalid until I disabled the auto-xcode management for their targets.

Pellet
  • 2,254
  • 1
  • 28
  • 20
0

Just fix it by connect the phone with mac, and In xcode run the app

Guessing maybe there some bugs with the apple provisioning systems

d0ye
  • 1,580
  • 1
  • 15
  • 26