iOS distribution - parameters in itms-services protocol link for plist
Asked Answered
M

4

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

Mispronounce answered 16/1, 2012 at 14:46 Comment(0)
S
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.
Shoifet answered 16/2, 2012 at 18:18 Comment(4)
These mime types are also useful for other web server platforms. ThanksFoscalina
Did you have to restart the server for it to pick up the new MIME types?Jamille
check my answer if you can't change the server mime type but you're lucky enough to have php there.Adrenal
@Jamille I didn't have to restart the server (IIS 8).Custard
H
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.

Hatbox answered 14/7, 2012 at 15:49 Comment(0)
A
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.

Au answered 28/8, 2013 at 17:32 Comment(0)
A
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.

Adrenal answered 25/9, 2013 at 20:20 Comment(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?Alchemy
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>Adrenal

© 2022 - 2024 — McMap. All rights reserved.