Quote:
var plistBuildAndParsed = plist.build(plist.parse(plistData));
Based on a quick read of
the documentation for that GitHub project[
^], all that line is going to do is convert your plist XML to JSON, then convert the JSON back to the equivalent plist XML.
If you debug your code, you'll probably see that the URL you're trying to launch looks something like:
itms-services:
Obviously, the contents of the plist XML file is not a valid URL.
In a supported browser, you could combine
URL.createObjectURL[
^] with a
Blob[
^] to generate a URL for your XML file. Unfortunately, the Blob API doesn't seem to be supported on iOS.
You could try
a data:
URI[
^] instead:
var plistUrl = "data:text/xml," + encodeURIComponent(plistBuildAndParsed);
link.setAttribute("href", "itms-services://?action=download-manifest&url=" + encodeURIComponent(plistUrl));