加入收藏 | 设为首页 | 会员中心 | 我要投稿 威海站长网 (https://www.0631zz.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 移动互联 > 应用 > 正文

IOS- 企业App"无法升级安装应用程序 因为证书无效"的解决方案

发布时间:2023-01-31 10:01:42 所属栏目:应用 来源:互联网
导读: 今天调试自己开发的一款企业级App,发现通过之前的url无法升级安装企业应用,一直提示“无法安装应用程序 因为证书无效”,折腾了一番,终于在StackOverFlow上找到了答案。在这里分享给大家

今天调试自己开发的一款企业级App,发现通过之前的url无法升级安装企业应用,一直提示“无法安装应用程序 因为证书无效”,折腾了一番,终于在StackOverFlow上找到了答案。在这里分享给大家。

StackOverFlow接:

原因是由于要安装更新企业应用,url必须是https的,不能是http,这就要求我们的服务器要支持https。因此,只要将原链接:

itms-services://?action=download-manifest&url=http://example.com/manifest.plist  

改为

itms-services://?action=download-manifest&url=https://example.com/manifest.plist  

测试

另外,如果想要在自己电脑上测试,可以运行下面脚本来支持https!

GitHub下载链接:

# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:

vlan 应用acl无效_微信小程序code无效_应用程序无效

# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes # run as follows: # python simple-https-server.py # then in your browser, visit: # https://localhost:4443 import BaseHTTPServer, SimpleHTTPServer import ssl httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler) httpd.socket = ssl.wrap_socket (httpd.socket, certfile='./server.pem', server_side=True) httpd.serve_forever()

其中httpd = BaseHTTPServer.HTTPServer((‘localhost’, 4443),

把’localhost’改成’ ‘应用程序无效,否则不能在手机的浏览器访问。

httpd = BaseHTTPServer.HTTPServer((’ ‘, 4443);

在电脑上启动:

python -m SimpleHTTPServer

访问

:4443

itms-services://?action=download-manifest&url=http://192.168.xx.xx:4443/manifest.plist  

可以把plist上传到自己本机,然后可以用手机测试企业级app更新升级了。

(编辑:威海站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章