1、利用模板技术动态生成plist文件的内容:(模板内容和data替换为plist需要的内容)

//artTemplate
<script src="js/template.js" type="text/javascript" charset="utf-8"></script>
<script ;
}
console.log(formatSpeed)
}
}, false);

xhr.onreadystatechange = function(response) {
if (xhr.readyState == 4 && xhr.status == 200 && xhr.responseText != "") {
var blkRet = JSON.parse(xhr.responseText);
console.log("上传成功")
} else if (xhr.status != 200 && xhr.responseText) {

}
};
xhr.send(formData);
};
//去后台请求token
$.ajax({
type:"get",
url:"/appstore/app/qiniuUploadToken?params=xucheng.plist",
async:true,
dataType:"json",
success:function(data){
var token =data.uptoken;
console.log(token);
Qiniu_upload(blob, token);
}
});
4、plist文件样例:
<?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://123.103.9.205:443/mobem/portal/download?filename=/Default/portal_ios.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>https://123.103.9.205:443/mobem/portal/download?filename=/Default/portal_icon.png</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>https://123.103.9.205:443/mobem/portal/download?filename=/Default/portal_icon.png</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.YYJZPortal</string>
<key>bundle-version</key>
<string>1.0</string>
<key>kind</key>
<string>software</string>
<key>subtitle</key>
<string></string>
<key>title</key>
<string>名称</string>
</dict>
</dict>
</array>
</dict>
</plist>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
  • 2021-06-29
  • 2022-12-23
  • 2021-12-15
猜你喜欢
  • 2021-07-23
  • 2022-01-14
  • 2021-05-19
  • 2021-11-20
  • 2022-01-15
  • 2021-12-11
  • 2021-07-28
相关资源
相似解决方案