From 2f313fe599a44d76a9848c4f95c7c405de2b831c Mon Sep 17 00:00:00 2001 From: kean Date: Mon, 26 Aug 2024 20:08:43 -0400 Subject: [PATCH] Fix demo --- Demo/Sources/iOS/Pulse_Demo_iOSApp.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Demo/Sources/iOS/Pulse_Demo_iOSApp.swift b/Demo/Sources/iOS/Pulse_Demo_iOSApp.swift index db03fcd24..44c38411d 100644 --- a/Demo/Sources/iOS/Pulse_Demo_iOSApp.swift +++ b/Demo/Sources/iOS/Pulse_Demo_iOSApp.swift @@ -24,7 +24,7 @@ private final class AppViewModel: ObservableObject { let log = OSLog(subsystem: "app", category: "AppViewModel") init() { -// URLSessionProxyDelegate.enableAutomaticRegistration(logger: NetworkLogger(store: .demo)) +// URLSessionProxyDelegate.enableAutomaticRegistration(logger: NetworkLogger(store: .demo)) // DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(3)) { // sendRequest() // } @@ -38,7 +38,9 @@ private final class AppViewModel: ObservableObject { } private func sendRequest() { - let session = URLSession(configuration: .default) + let session = URLSession(configuration: .default, delegate: DemoSessionDelegate(), delegateQueue: nil) let task = session.dataTask(with: URLRequest(url: URL(string: "https://github.com/kean/Nuke/archive/refs/tags/11.0.0.zip")!)) task.resume() } + +private final class DemoSessionDelegate: NSObject, URLSessionDelegate {}