xcode “无法下载应用程序。此时无法安装 <Appname>”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13266418/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 02:02:18  来源:igfitidea点击:

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

iosxcodedeploymenttitaniumin-house-distribution

提问by tugadesperado

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:

我现在快死了。我已经尝试了大约 2-3 周来解决该问题,但仍然没有结果。希望任何人都能够帮助我:

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.

我正在使用 Titanium Studio 编写 iOS 应用程序。直到 Mac OS X 10.6.8 和 Xcode 4.2 一切正常。我完全能够在 Xcode 中构建应用程序并在我们的企业内部部署它们。现在我已经使用 Xcode 4.5 升级到 OS X 10.8.2,然后我们就可以了...仍然可以构建应用程序并且可以在 iOS 模拟器上运行,但是如果我现在尝试在某些设备上获取该应用程序,我会得到一个消息“无法下载应用程序。此时无法安装-Appname-”。这可以通过 OTA 分发和使用 USB 电缆的 iTunes 实现。

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.

我几乎搜索了整个互联网,但我发现的所有内容都不起作用。但是如果我真的尝试通过 Xcode 部署应用程序,它虽然可以工作。

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.

它与那些配置文件和证书有关吗?我已经尝试撤销它们等等,但没有任何帮助。我还安装了全新的 OS X,这样我就有了一个干净的钥匙串。结果一样。

Would really really appreciate any kind of help. Thanks!

真的很感激任何形式的帮助。谢谢!

采纳答案by Moritz Roessler

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

当我升级到 Mountain Lion 并且不得不将 xCode 更新到 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

  1. 解压 Ipa unzip Application.ipa

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

  3. 如果没有正确的配置文件,请替换它 cp "ProvisioningProfile.mobileprovision" "Payload/Application.app/embedded.mobileprovision"

  4. 当我尝试手动退出应用程序时,我的问题是这个错误: "object file format unrecognized, invalid, or unsuitable"

    修理它 :

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

  5. 退出应用程序 /usr/bin/codesign -f -s "iPhone Distribution: Company Name" --resource-rules "Payload/Application.app/ResourceRules.plist" "Payload/Application.app"

  6. 压缩它 zip -qr "Application.resigned.ipa" Payload

Thanks to

谢谢

  1. This Questionon how to sign an app manually,
  2. the console which got me the error
  3. This Postwhich helped me to fix the error
  4. Apple which makes our lives too hard
  1. 这个关于如何手动签署应用程序的问题
  2. 使我出错的控制台
  3. 这篇文章帮助我修复了错误
  4. 苹果让我们的生活太难了


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

取自这个答案

回答by Stephen Cooke

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…

我有同样的“无法下载应用程序。“此时无法安装‘Appname’”消息,并花费了数周时间检查和更新证书、重建、重新进行 OTA 分发等。结果是我根本没有将 .mobileprovision 文件添加到项目中。以防万一这有助于任何人......