我尝试加载Webview时握手失败

时间:2020-10-06 09:48:42

标签: android ssl openssl ssl-certificate android-webview

在尝试加载Webview时出现此错误。

class Root<T>: Decodable where T: SPTBaseObject {
    let items: [T]
    
    private struct CodingKeys: CodingKey {
        var stringValue: String
        init?(stringValue: String) {
            self.stringValue = stringValue
        }
        var intValue: Int?
        init?(intValue: Int) {
            return nil
        }
    }
    
    required init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: CodingKeys.self)
        guard let key = T.pluralKey, let codingKey = CodingKeys(stringValue: key) else {
            fatalError()
        }
        items = try container.decode([T].self, forKey: codingKey)
    }
}

0 个答案:

没有答案