Alamofire版本5.2.0和5.2.1均在URL会话委托处崩溃

问题描述 投票:0回答:1

我正在使用最新的alamofire版本5.2.1来使WEB API调用它与所有API完美结合但是,当我为国家/地区列表调用api时,它在URL Session Delegate类中崩溃

 open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
        eventMonitor?.urlSession(session, dataTask: dataTask, didReceive: data)

        if let request = request(for: dataTask, as: DataRequest.self) {
            request.didReceive(data: data)
        } else if let request = request(for: dataTask, as: DataStreamRequest.self) { //Crash at this line
            request.didReceive(data: data)
        } else {
            assertionFailure("dataTask did not find DataRequest or DataStreamRequest in didReceive")
            return
        }
    }

同一请求对正常的URL会话非常有效,邮递员只有alamofire无法处理响应,我正在附上屏幕截图以获取更多详细信息。

响应包含2000行json,但我不认为这是问题

enter image description here

ios swift xcode alamofire alamofire-request
1个回答
0
投票
您好,此问题已在Alamofire上报道过

贡献者在Xcode 11.4.1之后说,此问题已通过移至Xcode 11.4.1得以解决

© www.soinside.com 2019 - 2024. All rights reserved.