3

iOS10 Safari 引导用户信任企业签名

 3 years ago
source link: https://www.isaced.com/post-285.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

iOS10 Safari 引导用户信任企业签名

今天研究了一下企业应用分发,网络上有很多文章讲如何利用一个 Web 页面进行 iOS 企业应用分发下载安装,这里就不再赘述;这篇文章主要针对的是企业应用安装后如何在 Safari 中引导用户跳转到 [设置 - 通用 - 描述文件] 页面去,以便用户信任你的企业签名描述文件,在 iOS9 的时候是很方便的,无论是在应用内或者 Safari 中都可以直接唤起,但是从 iOS10 起,苹果禁止了一切对 [设置] 主动的跳转。

  • in-App (openURL): iOS9✓ iOS10✓
  • Safari:iOS9✓ iOS10✗

另外还测试了一下,在应用内用 UIWebView 加载 HTML 进行跳转,结论与上一致。

URL Scheme

  • iOS 9 : prefs:root=General&path=ManagedConfigurationList
  • iOS 10 : App-Prefs:root=General&path=ManagedConfigurationList

可以看到 iOS10 并不能从 Safari 直接跳转 [描述文件] 页面了,但是还有一个方式可以达到该效果,那就是直接链接到一个企业签名的描述文件(.mobileprovision),在 Safari 中直接访问 http://foo.com/hello.mobileprovision 就可以实现跳转了。

既然我们知道了如何跳转,那么在网页中何时跳转呢?有的做法是用户在 Safari 中点击安装按钮后,制造一个假的进度条,比如大概 10 秒,估算应用已经下载、安装完毕,因为其实是无法获取真实的企业应用安装进度的,然后弹出一个 [信任] 按钮或一些操作图示,由以上方法跳转至 iOS 系统设置中的描述文件页面,让用户选择自己的企业证书描述并信任,这样才能打开对应企业应用。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK