I would like to pass the userid and password in the itms-services link so that the protected plist can be accessed.
To clarify, in the following link, the plist cannot be accessed directly as the access requires the userid and password to be entered so that plist is accessible.
<a href="itms-services://?action=download-manifest&url=http://example.com/app.plist">
Currently the above link gives an error
cannot connect to example.com
I Was installing the IPA and PLIST on a Windows IIS Server.
I had to add MIME types for .ipa and .plist to the IIS Server for the iPad to be able to download the application.
For IIS, Open IIS Manager. Right click 'Server(local computer)'
Select Properties
click 'MIME Types'
Click 'New...'
Add the Following MIME Types:
.IPA - application/octet-stream
.PLIST - text/plain.
You'll need make sure the access to .plist and .ipa are accessible. We had auth cookie protection over the files, iTune could't install, exact same error "can't connect to mydomain.com". It finally worked by removing the security protection.
For anyone who is interested in dynamically generating their plist, this example is PHP:
$appUrl='itms-services://?action=download-manifest&url=http://server/iOSpList.php?'.
'url%3D'.$app['url'].
'%26bundle%3D'.$app['bundle'].
'%26version%3D'.$app['version'].
'%26name%3D'.$app['name'];
Also, I believe the .plist mime type should be application/xml.
I had PHP on my server and couldn't access the server MIME configuration. So I did this:
app.plist.php
<?php
header('Content-type: application/xml');
$file = fopen("app.plist", "r");
while(!feof($file)){
$line = fgets($file);
print str_replace(".ipa", ".ipa.php", $line);
}
fclose($file);
?>
app.ipa.php
<?php
header('Content-type: application/octet-stream');
$file = fopen("app.ipa", "r");
while(!feof($file)){
$line = fgets($file);
print $line;
}
fclose($file);
?>
For some reason, using readfile
didn't work. But this did.