从https url访问数据时TIC SSL Trust出错

时间:2018-03-21 06:55:47

标签: ios swift

我已尝试通过以下方式访问https网址中的数据。

DispatchQueue.global(qos: .background).async {
        let stringURL = "https://192.168.104.91:8443/update_info.xml"
        let url = URL(string: stringURL)

        var data:Data? = nil

        do {
            data = try Data(contentsOf: url!)
        } catch {
            print(error.localizedDescription)
        }
    }

但我得到了以下错误。

2018-03-21 12:49:35.529949+0600 AppName[704:205346] TIC SSL Trust Error [1:0x1c0171a00]: 3:0
2018-03-21 12:49:35.541223+0600 AppName[704:205346] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)
2018-03-21 12:49:35.541283+0600 AppName[704:205346] Task <7D4A1063-B946-4588-830A-CE73AF5B4995>.<0> HTTP load failed (error code: -1202 [3:-9813])
2018-03-21 12:49:35.541771+0600 AppName[704:205344] NSURLConnection finished with error - code -1202
The file “update_info.xml” couldn’t be opened.

有什么建议吗?

0 个答案:

没有答案