Cyril Cyril - 1 year ago 101
Objective-C Question

Open a Configuration Profile through app

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 ?

Answer Source

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

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;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download