Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Unable to download application. <Appname> could not be installed at this time"

I'm almost dead now. I've been trying for about 2-3 weeks to fix that problem, but still no result. Hope anyone is able to help me:

I'm writing iOS Apps with Titanium Studio. Until Mac OS X 10.6.8 with Xcode 4.2 everything worked just fine. I was perfectly able to build apps in Xcode und deploy them In-House in our Enterprise. Now I've upgraded to OS X 10.8.2 with Xcode 4.5 and there we go... Apps can still be built and are runnable on the iOS Simulator, but if I try now to get the app on some devices, I get a message "Unable to download application. -Appname- could not be installed at this time". This happens either through OTA distribution and through iTunes with an USB Cable.

I've searched almost the entire internet, but all I've found didn't work at all. But if I actually try to deploy the application through Xcode it works though.

Does it have something to do with those Profiles and certificates? I've already tried to revoke them and so on, but nothing helped. I also installed OS X completely new, so that I have a clean keychain. Same result.

Would really really appreciate any kind of help. Thanks!

like image 343
tugadesperado Avatar asked Nov 07 '12 09:11

tugadesperado


2 Answers

Finally i found a solution, when i tried to sign the App manually, the console threw an Error message that helped me to fix it again.

The Problem started when i upgraded to Mountain Lion and had to update xCode to 4.5.2

Maybe it helps others who still couldn't find a solution after several days of searching the internet

  1. Unzip the Ipa unzip Application.ipa

  2. delete _CodeSignature rm -r "Payload/Application.app/_CodeSignature" "Payload/Application.app/CodeResources" 2> /dev/null | true

  3. if there isn't the right provisioning profile, replace it cp "ProvisioningProfile.mobileprovision" "Payload/Application.app/embedded.mobileprovision"

  4. The problem for me was this error when i tried to resign the app manually: "object file format unrecognized, invalid, or unsuitable"

    fix it :

    export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"

  5. resign the app /usr/bin/codesign -f -s "iPhone Distribution: Company Name" --resource-rules "Payload/Application.app/ResourceRules.plist" "Payload/Application.app"

  6. Zip it zip -qr "Application.resigned.ipa" Payload

Thanks to

  1. This Question on how to sign an app manually,
  2. the console which got me the error
  3. This Post which helped me to fix the error
  4. Apple which makes our lives too hard

Update It seems the location for codesigning has changed. The new path would be

export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate"  

As taken from this answer

like image 107
Moritz Roessler Avatar answered Oct 19 '22 15:10

Moritz Roessler


I had the same “Unable to download application. 'Appname' could not be installed at this time” message, and spent several weeks checking and renewing the certificates, rebuilding, re-doing the OTA distribution, etcetera. It turned out that I simply hadn't added the .mobileprovision files to the project. Just in case this helps anyone…

like image 44
Stephen Cooke Avatar answered Oct 19 '22 17:10

Stephen Cooke