浏览器如何不通过AppStore,直接安装IOS应用程序

1:不能有注释,

2:需要三个重要文件(.ipa,.plist,png).ipa文件就是应用程序文件, .plist文件是苹果需要通过itms-services协议访问的文件。png是图片的大小512*512,57*57两张

3:ipa,plist,png在服务器同一个目录存放

<?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://wwww.org/hs/hsapp.ipa</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>display-image</string>
                    <key>url</key>
                    <string>https://wwww.org/hs/logo.png</string>
                </dict>
                <dict>
                    <key>kind</key>
                    <string>full-size-image</string>
                    <key>url</key>
                    <string>https://wwww.org/hs/small_logo.png</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>com.app1016hs8</string>
                <key>bundle-version</key>
                <string>1.0</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>app标题</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

4:调用方式: 


(1)我们在网页的head标签中加入JS代码,当用户访问网页的时候自动触发,进行下载。
<script>
var url = "https://demo.abc.com/myapp/manifest.plist"; 
window.location = "itms-services://?action=download-manifest&url=" + url;
</script>
2.以web链接的形式,当用户点击触发a标签的时候进行下载
<a href="itms-services://?action=download-manifest&url=https://www.某某网址/manifest.plist">点击下载</a>

 

 

©️2020 CSDN 皮肤主题: 书香水墨 设计师:CSDN官方博客 返回首页