iOS 8 上的企业应用更新分发

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25772664/
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-08-31 02:21:17  来源:igfitidea点击:

Enterprise App Update Distribution on iOS 8

iosxcodeios8enterprise-distribution

提问by Patrick Perini

I have an enterprise app that I'm distributing via an itmsURL:

我有一个通过itmsURL分发的企业应用程序:

itms-services://?action=download-manifest&url=itms-services://?action=download-manifest&url=https://$MY_PLIST_URL.plist

On iOS 7, both downloads and updates work fine. On iOS 8, however, I get the error:

在 iOS 7 上,下载和更新都可以正常工作。但是,在 iOS 8 上,我收到错误消息:

LoadExternalDownloadManifestOperation: Ignore manifest download, already have bundleID: com.mycom.MyApp

In my plist, I have

在我的 plist 中,我有

<key>bundle-identifier</key>
<string>com.mycom.MyApp</string>
<key>bundle-version</key>
<string>0.2.2</string>

and on my app on iOS 8, I'm running version 0.2.1

在我的 iOS 8 应用程序上,我运行的是 0.2.1 版

采纳答案by Antoine

I've also encountered this problem with our app distribution. We were able to fix this issue by 'faking' the bundle identifier inside the .plist using for download distribution, keeping our ipa bundle identifier the same.

我在我们的应用程序分发中也遇到了这个问题。我们能够通过“伪造”用于下载分发的 .plist 中的包标识符来解决这个问题,保持我们的 ipa 包标识符相同。

For example, in your plist:

例如,在您的 plist 中:

<key>bundle-identifier</key>
<string>com.mycom.MyApp</string>
<key>bundle-version</key>
<string>0.2.2</string>

change com.mycom.MyAppto com.mycom.MyApp.ios8fix

com.mycom.MyApp更改为com.mycom.MyApp.ios8fix

The app will be installed using a new app icon, which will disappear after install.

将使用新的应用程序图标安装该应用程序,该图标将在安装后消失。

If you already have an install of the app, you will even see a new app icon during install. After the installation this icon disappears, but your already existing version of the app will be updated. With a clean install the installation icon will disappear and the installed application icon will appear in place.

如果您已经安装了该应用程序,您甚至会在安装过程中看到一个新的应用程序图标。安装后此图标消失,但您现有的应用程序版本将被更新。全新安装时,安装图标将消失,安装的应用程序图标将出现在原位。

It looks like iOS 8 is caching the bundle identifiers and compares the requested installs with these cached ones. Most of the times you'll only see an popup asking for install, but nothing happens.

看起来 iOS 8 正在缓存包标识符并将请求的安装与这些缓存的安装进行比较。大多数情况下,您只会看到一个要求安装的弹出窗口,但没有任何反应。

As Sean already noticed, this appears with xCode 6 GM and the official iOS 8 version. Devices which never installed your application before will have no problems to install the app.

正如 Sean 已经注意到的,这出现在 xCode 6 GM 和官方 iOS 8 版本中。以前从未安装过您的应用程序的设备在安装应用程序时没有问题。

回答by jlpiedrahita

This worked better for me, no need to touch your manifest or other trickery (perfect for Xcode Server where the plistis auto-generated):

这对我来说效果更好,无需触及您的清单或其他技巧(非常适合plist自动生成的Xcode Server ):

  1. Download iExplorer (http://www.macroplant.com/iexplorer/)
  2. Plug your device
  3. Delete all the files in "Media > Downloads"
  4. Restart device
  1. 下载 iExplorer ( http://www.macroplant.com/iexplorer/)
  2. 插入您的设备
  3. 删除“媒体 > 下载”中的所有文件
  4. 重启设备

This resets the device caches, now you can install your app as usual.

这将重置设备缓存,现在您可以像往常一样安装您的应用程序。

回答by Gil Hartman

I am having the same problem. I reproduced it by:

我有同样的问题。我通过以下方式复制它:

1) Having my application installed while upgrading from iOS 7 to iOS 8 GM

1) 在从 iOS 7 升级到 iOS 8 GM 时安装了我的应用程序

2) Removing it in iOS 8

2) 在 iOS 8 中删除它

3) Trying to install it via itms-services: with the same bundle name

3) 尝试通过 itms-services 安装它:使用相同的包名称

When I tried to change the bundle-identifier in the server plist (not in the applications Info.plist), it worked (application was downloaded an no "shadow" icon remained). But it looks like an apple bug.

当我尝试更改服务器 plist 中的包标识符(不在应用程序 Info.plist 中)时,它起作用了(下载了应用程序,但没有留下“阴影”图标)。但它看起来像一个苹果虫。

回答by Frans

The accepted solution no longer works on iOS9.

已接受的解决方案不再适用于 iOS9。

My understanding is that Apple has closed a serious iOS security hole by preventing adhoc binaries from replacing stock apps or apps downloaded from the App Store. See this article for background (CVE-2015-3722/3725 and CVE-2015-3725):

我的理解是,Apple 通过阻止临时二进制文件替换库存应用程序或从 App Store 下载的应用程序,关闭了一个严重的 iOS 安全漏洞。请参阅这篇文章了解背景信息(CVE-2015-3722/3725 和 CVE-2015-3725):

https://www.fireeye.com/blog/threat-research/2015/06/three_new_masqueatt.html

https://www.fireeye.com/blog/threat-research/2015/06/three_new_masqueatt.html

Taken the security implications, I wouldn't expect this behaviour to change in future IOS versions. Alternative options seem to be:

考虑到安全隐患,我不希望这种行为在未来的 IOS 版本中发生变化。替代选项似乎是:

  • delete the App Store version before installing the adhoc
  • distribute the adhoc as 'new' app by changing the bundle id in both the app and the distribution plist
  • use TestFlight
  • 在安装 adhoc 之前删除 App Store 版本
  • 通过更改应用程序和分发 plist 中的包 ID 将临时应用程序分发为“新”应用程序
  • 使用测试飞行

回答by Cfold

What Gil said seems to be correct, but more specifically, I found that I also needed to increment the bundle-version string in the server.plist:

Gil 说的似乎是正确的,但更具体地说,我发现我还需要增加 server.plist 中的 bundle-version 字符串:

    <key>bundle-version</key>
    <string>3.2.2</string>

This at least allows you to accomplish an OTA install.

这至少可以让您完成 OTA 安装。

(Sorry... Would've added to comments, but I'm too much a n00b.)

(对不起......本来可以添加到评论中的,但我太n00b了。)

回答by alexcristea

Take a look over this answerand this answer.

看看这个答案这个答案

You can fix this issue without any hacks, for iOS8 you have to include in the assetskey of the manifest .plistfile the display-imageand full-size-imagekeys. They were available in Xcode 5 when saving an archive for enterprise and add-hoc deployment, but were not required.

您无需任何技巧即可解决此问题,对于 iOS8,您必须assets在清单.plist文件的密钥中包含display-imagefull-size-image密钥。在为企业和临时部署保存存档时,它们在 Xcode 5 中可用,但不是必需的。

I have created a gist on github with the template for the install-manifet.plistfile.

我在 github 上用install-manifet.plist文件的模板创建了一个要点。

回答by Xiao

This a bug first found in iOS8 Beta5. And it was still not fixed by Apple in GM seed and official iOS8.0 version. More discussons could be found here

这是在 iOS8 Beta5 中首次发现的错误。而且苹果在通用种子和官方iOS8.0版本中仍然没有修复它。更多讨论可以在这里找到

The current workaround being tested by myself:

目前我自己正在测试的解决方法:

  • If you don't care the contents in your device: do a clean restore in DFU mode of the device
  • If you want your things back
    1. Backup your iOS Device in iTunes before restore (without Ad-Hoc/enterprise app)
    2. After restored your device cleanly, install your Ad-Hoc/enterprise app
    3. Restore your backup from iTunes
    4. Now you are free to delete those Ad-Hoc/enterprise apps and reinstall them.
  • 如果您不关心设备中的内容:在设备的 DFU 模式下进行干净还原
  • 如果你想要你的东西回来
    1. 恢复前在 iTunes 中备份您的 iOS 设备(无 Ad-Hoc/企业应用程序)
    2. 干净地恢复您的设备后,安装您的 Ad-Hoc/企业应用程序
    3. 从 iTunes 恢复备份
    4. 现在您可以随意删除这些 Ad-Hoc/企业应用程序并重新安装它们。

回答by Tallent Siu

Problem solved by changing the bundle identifier in plist.

通过更改 plist 中的包标识符解决了问题。

Normally, after tapping the itms link, it will shows the desktop which shows the icon installation. However, for my iOS 8.0 device, after tapping the itms link, it will not change to the installation page but installation is already working behind.

通常,点击 itms 链接后,它会显示显示图标安装的桌面。但是,对于我的 iOS 8.0 设备,点击 itms 链接后,它不会更改为安装页面,但安装已经在后面进行。

回答by pho0

This is extreme but if you can't change your bundle identifier, which I couldn't, restoring your iPhone through iTunes to the latest iOS 8 and restoring from a backup fixes the problem.

这是极端的,但如果您无法更改捆绑标识符,我不能,通过 iTunes 将您的 iPhone 恢复到最新的 iOS 8 并从备份中恢复可以解决问题。

回答by Alex Sorokoletov

Same problem exists on iOS 10 beta 1.

iOS 10 beta 1 也存在同样的问题。

Dec 31 19:01:32 iphone-6s itunesstored[98] : LoadExternalDownloadManifestOperation: Ignore manifest download, already have bundleID: com.***************.ios with phase: SSDownloadPhaseWaiting

12 月 31 日 19:01:32 iphone-6s itunesstored[98]:LoadExternalDownloadManifestOperation:忽略清单下载,已经有 bundleID:com.***************.ios 与阶段:SSDownloadPhaseWaiting

One thing that I do not understand here is that the date is December 31st in the XCode device log, however, device has correct date and time configured.

我在这里不明白的一件事是 XCode 设备日志中的日期是 12 月 31 日,但是,设备配置了正确的日期和时间。

Update:Guys from HockeyApp notified Apple about this problem during WWDC and fix should come in the next seed.

更新:来自 HockeyApp 的人在 WWDC 期间通知了苹果这个问题,修复应该在下一个种子中出现。