var url = "itms-services://?action=download-manifest&url=https://ios.xxx.com/index.php"; //这里是重点,必须要把index.php后面的所有参数进行encodeURIComponent编码才能有效 var en = encodeURIComponent("?name="+pack+"&userid="+userid); url += en;
以下是php动态生成plist的脚本 注意如果你没有https域名,推荐你去www.android.top进行苹果plist生成。
<?php if(!$_GET['name']){ exit(); } //以下是苹果plist文件格式 echo ' <?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>http://appdown.xxx.com/.$_GET['name'].'</string> </dict> <dict> <key>kind</key> <string>display-image</string> <key>needs-shine</key> <false/> <key>url</key> <string></string> </dict> </array> <key>metadata</key> <dict> <key>bundle-identifier</key> <string></string> <key>bundle-version</key> <string></string> <key>kind</key> <string>software</string> <key>title</key> <string></string> </dict> </dict> </array> </dict> </plist> ' ?>
原文链接:用php动态生成下载苹果ipa,plist文件,转载请注明来源!