通过应用打开配置文件 [英] Open a Configuration Profile through app
问题描述
我在一个URL中有一个.mobileconfig文件。我从xcode发送Http帖子(单击按钮时),http帖子包含.mobileconfig网址。当单击按钮时,我可以下载该文件吗?
I have a .mobileconfig file in one URL. I am sending the Http post from xcode(When a button is clicked), the http post contains the .mobileconfig url. Can i download that file when the button is clicked ?
推荐答案
在提供此文件时。它需要使用 application / x-apple-aspen-config
的MIME Content-Type
来提供。您可以通过在服务器的配置中添加一行或在以下文件夹中的 .htaccess
文件中添加以下行来实现此目的:
When it comes to serving up this file. It needs to be served up with a MIME Content-Type
of application/x-apple-aspen-config
. You may be able to do this by adding a line to your server's configuration or .htaccess
file in the folder with:
<IfModule mod_mime.c>
AddType application/x-apple-aspen-config .mobileconfig
</IfModule>
如果从PHP内部提供文件,则可以执行以下操作:
If serving the file from within PHP, you may do something like:
header('Content-type: application/x-apple-aspen-config; charset=utf-8');
header('Content-Disposition: attachment; filename="company.mobileconfig"');
echo $mobileconfig;
这篇关于通过应用打开配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!