problem description
Wechat scan Code download and install iOS and Android js Code
my APP installation package can only be displayed by scanning the code in the browser. Wechat of iOS and Android scanned the page and left the page blank untouched.
the environmental background of the problems and what methods you have tried
question 1 Wechat"s built-in browser iOS and Android scan code cannot be downloaded and installed
question 2 Wechat"s built-in browser scan iOS I need to add a prompt box indicating that Wechat is about to leave and open app Stroe download is actually a direct installation of
the case to be copied
iOS 2 2
2
the key point is that neither its APP package nor my APP package is available on the shelves because both of them need to be downloaded. Settings-Trust to open
related codes
/ / Please paste the code text below (do not replace the code with pictures)
my current code
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript">
/*
* :
*
*/
var browser = {
versions: function() {
var u = navigator.userAgent, app = navigator.appVersion;
return {//
trident: u.indexOf("Trident") > -1, //IE
presto: u.indexOf("Presto") > -1, //opera
webKit: u.indexOf("AppleWebKit") > -1, //
gecko: u.indexOf("Gecko") > -1 && u.indexOf("KHTML") == -1, //
mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), //
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios
android: u.indexOf("Android") > -1 || u.indexOf("Linux") > -1, //androiduc
iPhone: u.indexOf("iPhone") > -1 || u.indexOf("Mac") > -1, //iPhoneQQHD
iPad: u.indexOf("iPad") > -1, //iPad
webApp: u.indexOf("Safari") == -1 //web
};
}(),
language: (navigator.browserLanguage || navigator.language).toLowerCase()
}
if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
// TODO ios
window.location="http://www.kzapp.com.cn/QRcode/kzwx.ipa";
}
else if (browser.versions.android) {
// Andoird
window.location="http://www.kzapp.com.cn/QRcode/kzwx.apk";
}
// document.writeln(": " + browser.language);
// document.writeln(" : " + browser.versions.mobile);
// document.writeln(" ios: " + browser.versions.ios);
// document.writeln(" android: " + browser.versions.android);
// document.writeln(" iPhone: " + browser.versions.iPhone);
// document.writeln(" iPad: " + browser.versions.iPad);
// document.writeln(navigator.userAgent);
</script>
</head>
<body>
</body>
</html>
what result do you expect? What is the error message actually seen?
consistent with the reference case I provided, scan the iOS prompt box of Wechat"s built-in browser, and then download and install it directly
scan the code in other external browsers and download directly
Today"s update on 2018-8-9: tested the reference materials given by group friends: https://blog.csdn.net/qian_me. (title: itms-services protocol, install IOS applications directly through AppStore,)
but the Safari test cannot open the web page
xxx.plist file code
<?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://www.kzapp.com.cn/QRcode/kzwx.ipa</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.qgbes.pjob</string>
<key>bundle-version</key>
<string>1.0.0</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>APPAppstore</string>
</dict>
</dict>
</array>
</dict>
</plist>
final composition test connection
itms-services://?action=download-manifest&url=" https://gitee.com/214836649/e."