以编程方式安装.mobileconfig [英] Install .mobileconfig Programmatically

查看:796
本文介绍了以编程方式安装.mobileconfig的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个应用程序,以便自动完成将Apple移动设备连接到wifi网络并将配置配置文件下载到设备的过程。由于它是自动化的(通过诸如Native Driver之类的东西),所有功能都需要由应用程序本身控制,而不是发送到另一个应用程序,如设置或Safari。

I am writing an app in order to automate the process of connecting an Apple mobile device to a wifi network and downloading configuration profiles to the device. Since it is being automated (by something such as Native Driver), all of the functions need to be controlled by the app itself, not sent to another app such as Settings or Safari.

我已经使用Apple80211私有框架连接到wifi网络以及UIWebView代替浏览器以导航到特定网页。导航到此网页后,我的服务器将向移动设备发送.mobileconfig文件,以便安装配置文件。一旦服务器发送了这个.mobileconfig文件,我就无法找到明确的答案。我在几个不同的地方读过UIWebView一旦发送就无法处理.mobileconfig文件。发送时处理此文件的最佳方法是什么?

I am already using Apple80211 private framework to connect to a wifi network as well as UIWebView in place of a browser in order to navigate to a specific webpage. Once I navigate to this webpage, my server will send the mobile device a .mobileconfig file in order to install a configuration profile. I haven't been able to find a clear answer on how to handle this .mobileconfig file once it is sent by the server. I have read in a few different places that UIWebView cannot handle the .mobileconfig file once it is sent. What would be the best way to handle this file when it is sent?

此外,一旦发送,并授予某些东西可以处理文件,有没有办法以编程方式安装配置文件而无需用户输入?即,我是否可以实施任何公共或私人框架,以便在幕后安装配置文件?

Also, once it is sent, and granted that something can handle the file, is there a way to install the configuration profile programmatically without the need for user input? i.e. are there any public or private frameworks that I can implement in order to install the configuration profile "behind the scenes?"

此应用程序仅用于测试目的,并且只会存在于少数设备上。在此先感谢,任何帮助将不胜感激。

This app is only ever going to be used for testing purposes, and will only ever live on a handful of devices. Thanks in advance, any help will be much appreciated.

推荐答案

我尝试过类似的事情。

不幸的是我没有使用 UIWebView 运行它,但是切换到它工作的Safari:

Unfortunately I didn't get it running with the UIWebView, but with switching to the Safari it worked:

切换到safari,让用户安装配置并将其发送回您的应用。只需注册一个自定义URL方案,如 yourapp:// ,并在< c> c>中添加 URL 的链接code> HTML 。

Switch to safari, let the user install the config and send him back to your app. Just register to a custom URL Scheme like "yourapp://" and add a link to this URL in the HTML.

这篇关于以编程方式安装.mobileconfig的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆