我需要让我的用户安装一个根CA证书,这是包括在我的Phonegap应用程序(就像你会包括你的图像或javascript文件)。我能够链接到文件,就像一个标准的嵌入式图像。例如:
<!-- this is an image included in the phonegap app -->
<img src="img/mylogo.png" />
<!-- this is the certificate also included in the phonegap app -->
<a href="cert/mycacert.cer">My Cert</a>当我打开iOS上的应用程序并点击到嵌入式证书的链接时,什么都不会发生。我的目标是让iOS提示安装证书。有更好的方法吗?
谢谢!
发布于 2017-03-24 12:10:29
不幸的是,我没能把这件事办好。我尝试了FileTransfer,它有一个资源的相对路径和一个普通的普通链接,两者都不起作用。
最后,我将证书托管在SSL受保护的域上供下载。在下载过程中,我使用了cordova-plugin-inappbrowser和以下代码:
window.open('https://thesite.com/thecert.cer', '_server')
DL启动并提示按预期安装。
https://stackoverflow.com/questions/42977687
复制相似问题