Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gwelmarten

macrumors 6502
Original poster
Jan 17, 2011
476
0
England!
Hi
In our app, we direct the user to download a .mobileconfig. Originally the problem was Safari just displayed the XML rather than downloaded that, but we got around this with a PHP script (below).
Code:
<?php
$file = "http://example.com/myProfile.mobileconfig"; 
header("Content-Description: File Transfer"); 
header("Content-Disposition: attachment; filename=\"$file\""); 
readfile ($file); 
?>
However we commonly see it where the .mobileconfig is downloaded and automatically it brings up the 'do you wish to install page'. How is that done? Are we missing something in Content-Type?
Thanks,
Sam
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.