- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试从 webview 加载 php 脚本,但每次都出现错误。
NSURLSession/NSURLConnection HTTP 加载失败(kCFStreamErrorDomainSSL,-9814)
我已经将我的 info.plist 更新为
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
请帮我看看哪里出错了。
这是我的代码
func webView(webView: UIWebView, shouldStartLoadWithRequest request: NSURLRequest, navigationType: UIWebViewNavigationType) -> Bool {
let str : NSString = request.URL!.absoluteString
let url = NSURL(string: request.URL!.absoluteString)
if (str.rangeOfString("https://testing.com/paymethod2.php").location != NSNotFound)
{
}
else
{
webView.stopLoading()
}
return true
}
func webViewDidFinishLoad(webView: UIWebView) {
let doc = webView.stringByEvaluatingJavaScriptFromString("document.documentElement.outerHTML")
print(doc)
}
谢谢
最佳答案
9814 是 errSSLCertExpired。更新您的证书。如果您使用的是一些自签名证书,并且您真的希望它在已过期的情况下仍然有效,请阅读此文档:
关于ios - (kCFStreamErrorDomainSSL,-9814),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36569937/
我正在尝试从 webview 加载 php 脚本,但每次都出现错误。 NSURLSession/NSURLConnection HTTP 加载失败(kCFStreamErrorDomainSSL,-9
我正在尝试调试一个进行大量 HTTP 调用的应用程序。我在控制台看到这个: 2015-09-08 17:21:01.458 MyApp[3186:3064431] NSURLSession/NSURL
您运行此代码: let URL = "https://www.nasa.gov/sites/default/files/wave_earth_mosaic_3.jpg" let imageData =
你运行这段代码: let URL = "https://www.nasa.gov/sites/default/files/wave_earth_mosaic_3.jpg" let imageData
我正在使用 Alamofire 向服务器发送请求,但收到以下错误: NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomai
当连接到客户端的服务器时,我收到(kCFStreamErrorDomainSSL, -9813)。 客户端的服务器有一个我无法更改的自签名证书。该应用程序使用 AFNetworking 3.x。我尝试
尝试从 Twitter 加载图像文件时,我间歇性地出现此错误,URL 如下:https://pbs.twimg.com/media/Ck-9Oc6XIAAIb8B.jpg 针对 ios8 并在两个 i
调用第三方库时,出现如下问题。 NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) Error
iOS9.3 xcode7.3.1我想使用 WebView 访问 HTTPS 站点,出现错误(kCFStreamErrorDomainSSL, -9843) NSMutableURLRequest*
所以我知道 ATS 的东西以及如何编辑 info.plist 以允许 HTTP。但是,URL 是 https://api.map.baidu.com/api?v=2 . 0&ak=1XjLLEhZhQ
在模拟器上运行应用程序时,我在 iOS 9 上收到 NSURLSession/NSURLConnection HTTP 加载失败。这是我的 info.plist 文件的样子 NSAppTranspor
在模拟器上运行应用程序时,我在 iOS 9 上收到 NSURLSession/NSURLConnection HTTP 加载失败。这是我的 info.plist 文件的样子 NSAppTranspor
我正在尝试将具有自签名证书的 HTTPS 网页加载到 UIWebView 中。使用类似 this one 的提示, 或 this one ,它在 iOS 6 下工作。同样在 iOS 7 中不起作用。
我尝试在 Swift 中使用 NSURLSessionDownloadDelegate 下载文件。但是当我调用下载方法时,它经常显示以下错误。 Error Domain=NSURLErrorDomai
因此,我尝试了搜索此问题时出现的解决方案中提到的修复,但在 Visual Studio 上,我的 iOS Web View 项目仍然遇到这些问题。 android 版本工作正常,但 iOS 无法正常加
我现在正在测试环境中试用我的应用程序,该应用程序具有在 web View 中打开 URL 的功能,但现在测试时,生产数据库中的文件 URL 来自亚马逊并具有以下格式: self.url = @"htt
我正在尝试使用 Alamofire 从我的服务器访问数据。我已尝试以所有可能的方式编辑 info.plist,但无法从链接“https://plus.livectlab.com//users_vide
每当我尝试向我们的服务器发出请求时,我都会收到此错误。在我们设置 SSL 之前它工作正常,不是一团糟..这是我的代码: // Setup URL POST Request.. NSString*
我想在 Web View 中加载我的 Url,它向我显示错误,如 NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomain
我收到错误:NSURLSession/NSURLConnection HTTP 加载失败(kCFStreamErrorDomainSSL,-9802),我怀疑这是因为从 Parse 查询图像。这是我查
我是一名优秀的程序员,十分优秀!