iOS 9 启动服务 : ERROR: There is no registered handler for URL scheme itms-services

标签 ios ios9 enterprise-distribution

我们有一些内部应用程序,在 iOS 9 之前,应用程序会在版本比较后打开一个类似“itms-services://”的链接,然后下载并安装新版本的应用程序。

但在 iOS 9 上测试后,我们发现应用程序无法打开“itms-services://”链接,出现类似“LaunchServices: ERROR: There is no registered handler for URL scheme itms-services”的错误

我们用来更新应用的代码:

let downloadUrl = NSURL(string: url)
UIApplication.sharedApplication().openURL(downloadUrl!)

我们已经测试将“itms-services”、“itms-services://”和完整的 URL 放入 plist 文件中的“LSApplicationQueriesSchemes”。但还是不行。

最佳答案

我和你遇到了同样的问题。我通过应用程序首先使用 safari 打开 html url 的方法解决了这个问题,

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http:// xx.xx.xx.xx/xx.html"]];

html url 重定向到 url --- itms-services://?action=download-manifest&url= https://xx.xx.xx.xx/xx/xx.plist地址。虽然这种方法可以更新我的应用程序,但是更新过程需要先打开Safari然后提示打开App Store,如果你选择打开按钮然后它会提示是否安装你的应用程序,最后你确认安装按钮。该应用程序将自动安装。

我的html内容如下:

<html>
<head>
<metahttp-equiv="Content-Type" content="text/html;charset=utf-8" />
     <script type="text/javascript">
               function load()
               {
                        window.location ="itms-services://?action=download-manifest&url=https://xxx/xx/xx.plist";
               }
     </script>
</head>
<body onload = "load()">

关于iOS 9 启动服务 : ERROR: There is no registered handler for URL scheme itms-services,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32652083/

相关文章:

xcode - 从 Swift 1.2 - 2.0 更新 tableView 代码

ios - 如果我编辑 InHouse Distribution 配置文件,现有已安装的应用程序会怎样?

ios - 比特码和企业发行

ios - 屏幕突然变白

iphone - 尝试将代码抽象到库中,但我的代码无法正常工作,我不知道为什么

ios - 当全局变量的值发生变化时如何启动方法?

ios - 在 MKMapView 上查看和流行预览

ios - Swift 3 - 连接到 MySql

ios - 致命异常 : NSInternalInconsistencyException Failed to create remote render context

ios - 可以在企业团队和标准团队之间共享iOS应用程序组吗?