Skip to content

Forward didCreateTask to the delegate on macOS and Mac Catalyst - #895

Merged
kean merged 1 commit into
mainfrom
fix/data-loader-did-create-task-macos
Aug 15, 2026
Merged

kean merged 1 commit into
mainfrom
fix/data-loader-did-create-task-macos

Conversation

@kean

@kean kean commented Aug 15, 2026

Copy link
Copy Markdown
Owner

DataLoader.delegate never received urlSession(_:didCreateTask:) on macOS or Mac Catalyst, so proxy delegates like Pulse's URLSessionProxyDelegate saw every other callback but no task-creation events there. The forwarding method was wrapped in #if !os(macOS) && !targetEnvironment(macCatalyst), added years ago when the macOS SDK didn't declare the delegate method; it has existed since macOS 13, and the method's own runtime #available check already covers the macOS 12 deployment target.

The method was wrapped in a platform check added back when the macOS SDK
didn't declare it; the runtime `#available` check is enough now.
@kean
kean merged commit 8cc36a5 into main Aug 15, 2026
5 checks passed
@kean
kean deleted the fix/data-loader-did-create-task-macos branch August 16, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant