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

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!

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
Unzip the Ipa
unzip Application.ipa
delete _CodeSignature
rm -r "Payload/Application.app/_CodeSignature" "Payload/Application.app/CodeResources" 2> /dev/null | true
if there isn't the right provisioning profile, replace it
cp "ProvisioningProfile.mobileprovision" "Payload/Application.app/embedded.mobileprovision"
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"
resign the app
/usr/bin/codesign -f -s "iPhone Distribution: Company Name" --resource-rules "Payload/Application.app/ResourceRules.plist" "Payload/Application.app"
Zip it
zip -qr "Application.resigned.ipa" Payload
Thanks to
This Question on how to sign an app manually,
the console which got me the error
This Post which helped me to fix the error
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

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…

Related

Xcode 9 - Alamofire Pods. Command /bin/sh failed with exit code 1

/Users/Alex/Library/Developer/Xcode/DerivedData/MyProject-ehabmnclpzlywhabrefntacibonm/Build/Intermediates.noindex/ArchiveIntermediates/Fuego/InstallationBuildProductsLocation/Applications//MyProject.app/Frameworks/Alamofire.framework: unknown error -1=ffffffffffffffff
Command /bin/sh failed with exit code 1
I got this issue when I Archive my project. When I run app on simulator it works ok without such issue above.
Also it works ok with Xcode 8, but now when I try to Archive it on Xcode 9 I have this issue. But maybe this is not the case as I reinstall Mac OS from scratch, so it maybe cocopods version issue I am not sure.
Also two // here in the example above is also strange for me /Applications//MyProject.app
I believe it's a Xcode's bug. Restart your Mac and try to build again. Xcode would ask permission to access your Keychain before build Alamofire, then just allow it.
Hm it's very strange after some search on the Web I found that this is actually signing issue.
I used Xcode to generate new distribution certificate and maybe this leads some problems for me.
What I did to solve my issue.
I removed all certificates on my Mac and in my apple account.
I removed all prov profiles as well on my Mac and in my apple account.
I requested certificate and save it on the disc manually (not via Xcode )
I recreated certificate and profile. Downloaded it manually and double click on it.
After that I faced with keychain issue when I can not enter password to allow signing my certificate. I use this link to move certificate form login to system section.
Finally I get it work.

Xcode - "The Argument Is Invalid"

I am trying to create an Ad-hoc version for beta testing(.ipa extension) of an ios app I made. The problem is that whenever you try to install the app via Xcode>Organizer>DEVICE>Applications>Add I get a message saying "The argument is invalid". The app installs just fine on the simulator and all of my devices with no warning or errors if you installing it via the "Build and Run" button. I just get this message when trying to install the .ipa. I have double checked the Provisioning Profile and the device(s) are correctly added. I am code signing the project to the "iPhone Distribution" Profile with all of the correct devices. Also, from reading similar questions on here (Q1,Q2) I though it might be a symlink problem. I removed all of the symlinks and still get this error. I ran
find ./ -type l -exec ls -l {} \;
to find all the symlinks and after fixing all of them when I run that command it doesn't return anything.
Any ideas on how to fix this error?
Thanks :)
After nearly 8 hours of messing with Xcode I figured it out. It turns out that the Appirater library, which I had included via Cocoapods, had 1 symbolic link that was messing everything up. I just installed Appirater myself(and removed it from Cocoapods) and now everything works fine. Hope this helps anyone with the same problem in the future. :)

Signing Issues for Cydia

I am trying my best to update an app for Cydia that is constantly crashing on startup. It has a base SDK of 7.0 with a deployment target of 6.0. I have Xcode set to not require code signing. I have tried this many different ways, and each way, it crashes on startup when I download from Cydia.
First, I tried not code signing and using ldid on my Mac to psuedo-sign it. I copied the .app file to my desktop and then did:
Open Terminal on the OSX system where the application was built.
Add the SHA1 hashes to the application binary:
# cd ~/Desktop/
# ldid -S HelloWorld.app/HelloWorld
I tested this out by copying it to my iPhone, and it worked fine. I then uploaded the .app file to thebigboss repository, and when it went live I downloaded it, but it crashed on startup.
My next attempt was to simply create a certificate in Keychain Access. I left it as a self-signed root and changed it to code-signing. I put in a unique serial, and left valid days at 365. I then tried using it in Xcode but Xcode gave me an error that it was no longer valid and I needed to check the expiration date of my certificate.
I really need help with this, as I cannot figure out for the life of me what is going wrong here, and customers on Cydia are getting upset.

"The codesign tool could not be found" from Xamarin Studio

I'm trying to generate an IPA file for my App from Xamarin Studio, on Mac, and i'm getting this error:
"The codesign tool could not be found"
I checked the certificates, provisioning profiles, etc. I generated apps before in this machine, using the same developer account.
From Terminal i can see that codesign command is being recognized, but maybe Xamarin Studio is looking for it in a different place.
Similar problem in XCode
I tried to generate the IPA from a random project in XCode and it gave me a similar error:
"can't exec 'codesign'"
Then i found an issue on stackoverflow that said to copy the codesign program from /usr/bin to /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u‌​sr/bin
I did that and everything worked fine in XCode, but still getting the same error from Xamarin Studio.
Any ideas?
Thanks in advance!
I don't know anything about xamarin, but chances are you don't have command line tools installed. Go to preferences and downloads. I think it comes standard with Xcode 5 now, but maybe not.
Since i was totally out of time, and needed a workaround, i reinstalled the OS and all the tools, and it did the job for me.
I'm sorry i couldn't get to a more concrete solution for this problem.

Xcode4.2 : an error occurred uploading to the itunes store

Hey in trying to submit my app to iTunes. It passes the validation, but when i submit it's showing an error:
an error occurred uploading to the iTunes store
I have tried all possible solutions that I found during searching about this problem for almost one day .
I tried these lines without any success
cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5
sudo ln -s CurrentJDK /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
I use xcode 4.2 and snow leopard Mac OS .
Just use the newest Application Loader to submit apps. For Snow Leopard Mac OS, you can download Application Loader 2.5 from here to see what the problem really is. If nothing else is wrong, you may get this error:
This bundle is invalid. Apple is not currently accepting applications built with this version of the SDK, xcode.
I am also working on submitting apps with Xcode 4.2, because my macbook is too old to upgrade to Lion and to install Xcode 4.6. It seems that Xcode 4.2 is too old to be supported and the best solution is to install Xcode 4.6.
This error says that there is something wrong with the upload process. I don't believe you can fix it without getting in touch with Apple.
I've had this error once (already some months ago). It was caused by a server side issue by Apple at that day, but today the Apple servers are working without any issues (tried with Xcode 4.6).

Resources