setCancellationHandler(_:)
Sets a closure the session calls when it’s canceled.
Declaration
@preconcurrency func setCancellationHandler(_ cancellationHandler: @escaping @Sendable (XPCRichError) -> Void)Parameters
- cancellationHandler:
A closure that receives an error indicating why the session was canceled.