思路:ios开发人员提供ipa包、配置plist文件,配置https服务、创建下载页面以及链接
1. xml plist文件 看本文最后
2. 这里提供两个免费的SSL证书网站,配置好服务器就可以使用了
https://letsencrypt.org / https://certbot.eff.org
https://www.jianshu.com/p/801b67cc2ff8 这篇文有配置说明cerbot生成免费SSL证书的步骤
3.在nginx 配置:
server {
listen 80;
#/etc/letsencrypt/live/www.xxxx.cc
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/www.xxxx.io/cert.pem;
ssl_certificate_key /etc/letsencrypt/live/www.xxxx.io/privkey.pem;
server_name www.xxxx.cc xxxx.cc;
root /data/www/officialWeb;
index index.html index.php;
# error_log /data/www/www.xxxx.cc/storage/logs/xxxx_err.log;
location / {
# try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$) {
# allow 111.111.11.1;
# deny all;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index /index.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
4. 下载demo代码:<a href="itms-services://?action=download-manifest&url=https://www.xxxx.cc/apps/eoscash.plist"> download </a>
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>http://xxxsdf.com/xxxx/xxxx.ipa</string><!-- http 或者https链接, ipa文件下载地址 -->
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>needs-shine</key>
<true />
<key>url</key>
<string>https://xxxx.xxxxx/xxxxx/images/logo_im.png</string> <!-- http或者https 链接图片地址 -->
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>https://xxx.xxx/xxxx/images/logo_im.png</string><!-- http或者https链接的小图片地址 -->
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.beebay.jsnet</string><!-- BundleID 新建app时的包名 -->
<key>bundle-version</key>
<string>1.0.1</string><!-- 版本号 -->
<key>kind</key>
<string>software</string>
<key>title</key>
<string>EOSCash</string><!-- 安装app时的提示信息 -->
</dict>
</dict>
</array>
</dict>
</plist>