15

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

0

4 Answers 4

27

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.
4
  • These mime types are also useful for other web server platforms. Thanks
    – John Sibly
    Commented Dec 11, 2012 at 11:52
  • Did you have to restart the server for it to pick up the new MIME types?
    – Richard
    Commented Jul 12, 2013 at 16:24
  • check my answer if you can't change the server mime type but you're lucky enough to have php there.
    – cregox
    Commented Sep 25, 2013 at 20:21
  • @Richard I didn't have to restart the server (IIS 8).
    – pinki
    Commented Apr 1, 2014 at 21:12
3

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.

2

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.

1

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.

2
  • How will <a href="itms-services://?action=download-manifest&url=http://localhost/AppDistribution/app.plist">Install App</a> be linked with the php script above? I have setup html link. I have also created above 2 php file. But not sure how to connect html link to php script?
    – DShah
    Commented Jul 4, 2015 at 15:52
  • Just add .php there to reference the file. In your case: <a href="itms-services://?action=download-manifest&url=http://localhost/AppDistribu‌​tion/app.plist.php">Install App</a>
    – cregox
    Commented Jul 4, 2015 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.