Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2790
  • Last Modified:

mobileconfig on iphone via php

I have a .mobileconfig file , and want to serve it to the iphone via php. I have this in my php file :

header('Content-type: application/x-apple-aspen-config; charset=utf-8');
header('Content-Disposition: attachment; filename="test.mobileconfig"');


my config file is named test.mobileconfig.

I keep getting this error on the iphone:
cannot install profile
safari could not install a profile due to an unknown error

Any ideas?
0
sikt
Asked:
sikt
1 Solution
 
packetguyCommented:
You have to add the "x-apple-aspen-config" MIME type to your apache server httpd.conf file, or, depending on your apache server's configuration you may be able to do locally within the directory containing the .mobileconfig file by creating a .htaccess file. Add the following lines:

<IfModule mod_mime.c>
      AddType application/x-apple-aspen-config .mobileconfig
</IfModule>

This way your .mobileconfig file will be served up with the MIME Content-Type of application/x-apple-aspen-config.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now