微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

iOS 9 LaunchServices:错误:没有注册处理程序的URL scheme itms-services

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

但是在iOS 9测试之后,我们发现这些应用无法打开“itms-services://”链接,出现错误,如“LaunchServices:ERROR:没有注册处理程序的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()">

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐