nw_read_request_report [C9] 接收失败,错误 "Software caused connection abort"
nw_read_request_report [C9] Receive failed with error "Software caused connection abort"
应用程序连接丢失时出现此错误。从另一个应用程序重定向到我的应用程序时,我遇到这个 issue.This 仅在实时应用程序上触发的问题,连接丢失时出现错误,而使用 Xcode 进行调试时出现错误但成功重定向到特定视图控制器我使用了深度链接使用 url 方案来处理来自另一个应用程序的响应。仍然不清楚确切的问题是什么,因为无法调试实时应用程序问题。
致力于 iOS 13.2
在 AppDelegate 中:
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
let components = NSURLComponents(url: url, resolvingAgainstBaseURL: true)
let params = components?.queryItems
signedResponse = (params?.first(where:{[=12=].name == "signedResponse"})?.value)!
self.decodedMsgString = String(data:Data(base64Encoded: signedResponse)!,encoding:.utf8)!
print("decodedMsgString : \(decodedMsgString)")
//Call API here
return true
}
我也 运行 关注这个问题,也许这可以给你一个见解?
https://forums.developer.apple.com/thread/106838
来自其中一个回复
Following up, we determined that the issue was caused because our app continued to issue new NSURLConnection requests after going into the background and wasn't explicitly making them background tasks. As we didn't need background syncing, putting in code to prevent new requests from going out once the app was in the background eliminated this error.
应用程序连接丢失时出现此错误。从另一个应用程序重定向到我的应用程序时,我遇到这个 issue.This 仅在实时应用程序上触发的问题,连接丢失时出现错误,而使用 Xcode 进行调试时出现错误但成功重定向到特定视图控制器我使用了深度链接使用 url 方案来处理来自另一个应用程序的响应。仍然不清楚确切的问题是什么,因为无法调试实时应用程序问题。 致力于 iOS 13.2 在 AppDelegate 中:
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
let components = NSURLComponents(url: url, resolvingAgainstBaseURL: true)
let params = components?.queryItems
signedResponse = (params?.first(where:{[=12=].name == "signedResponse"})?.value)!
self.decodedMsgString = String(data:Data(base64Encoded: signedResponse)!,encoding:.utf8)!
print("decodedMsgString : \(decodedMsgString)")
//Call API here
return true
}
我也 运行 关注这个问题,也许这可以给你一个见解? https://forums.developer.apple.com/thread/106838
来自其中一个回复
Following up, we determined that the issue was caused because our app continued to issue new NSURLConnection requests after going into the background and wasn't explicitly making them background tasks. As we didn't need background syncing, putting in code to prevent new requests from going out once the app was in the background eliminated this error.