在UIWebview中允许未验证的ssl证书 [英] Allow unverified ssl certificate in UIWebview

查看:142
本文介绍了在UIWebview中允许未验证的ssl证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在UIWebView中嵌入了一个网站。在开发过程中,我指向localhost。问题是,只要它点击https://url它就不会加载。当我在移动safari中加载网址时,我会收到此弹出窗口:

I'm embedding a website in a UIWebView. During development I have it pointed at localhost. The problem is that whenever it hits a "https://" url it doesn't load. When I load the url in mobile safari I get this popup:

有没有办法用UIWebView覆盖它以允许未验证的URL?

Is there a way to override this with the UIWebView to allow the unverified url?

推荐答案

尼克的回答将使您的应用程序不被苹果公司在App Store中接受,乔治的答案将无法加载具有.css或.js或任何页面的页面的其余部分其他二次下载。有一个完整的答案这里允许UIWebView从具有不受信任证书的站点加载页面。

Nick's answer will keep your app from being accepted by Apple in the App Store and George's answer will fail to load the remainder of a page that has .css or .js or any other secondary downloads. There is a complete answer here that allows the UIWebView to load pages from a site with an untrusted certificate.

这篇关于在UIWebview中允许未验证的ssl证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆