iOS distribution - parameters in itms-services protocol link for plist

大憨熊 提交于 2019-12-02 18:21:11
scooter133

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!