0

I am trying to make a download link to my IOS app. This, as we all knows, requires a .plist file with all the informations regarding the app. I would like to make the download link, without having to create a file. I have tried to do it, but it does not work. I maybe think, it is because the link contains "url", which just points to the XML it selfs. Any ideas?

I have used this library: https://github.com/TooTallNate/plist.js

Pastebin: https://pastebin.com/0fTqweYP

$( "#iosDownloadButton" ).click(function() {
            var plistData =
            '<?xml version="1.0" encoding="UTF-8"?>' +
            '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' +
            '<plist version="1.0">' +
                '<dict>' +
                    '<key>items</key>' +
                    '<array>' +
                        '<dict>' +
                            '<key>assets</key>' +
                                '<array>' +
                                    '<dict>' +
                                        '<key>kind</key>' +
                                        '<string>software-package</string>' +
                                        '<key>url</key>' +
                                        '<string>https://blablabla.dk/fil.ipa</string>' +
                                    '</dict>' +
                                '</array>' +
                            '<key>metadata</key>' +
                            '<dict>' +
                                '<key>bundle-identifier</key>' +
                                '<string>dk.blablabla.MyApp</string>' +
                                '<key>bundle-version</key>' +
                                '<string>1.0.0</string>' +
                                '<key>kind</key>' +
                                '<string>software</string>' +
                                '<key>title</key>' +
                                '<string>My App</string>' +
                            '</dict>' +
                        '</dict>' +
                    '</array>' +
                '</dict>' +
            '</plist>';
            var plistBuildAndParsed = plist.build(plist.parse(plistData));

link = document.createElement("a");
            link.setAttribute("href", "itms-services://?action=download-manifest&url="+plistBuildAndParsed);
            link.click();
        });
Craig Wayne
  • 4,499
  • 4
  • 35
  • 50
Anders
  • 105
  • 1
  • 9
  • After some unsuccessful attempts, it seems this is out of my depth since i am unable to test the link properly. Wish you the best of luck @Anders – Craig Wayne Apr 03 '19 at 12:39
  • Ty, Craig.. I cannot belive I am the only one with this kind of a problem... Really nobody else who have had the same idea? ... – Anders Apr 03 '19 at 13:32
  • Still stuck... If anyone have an idea, pleas write.. This annoys me – Anders Apr 05 '19 at 07:57

0 Answers0