One Logo Pool Ball
SwiftUI · IOS API REFERENCE

BackgroundTask

struct · iOS 16.0+ · SDK 27.1

struct BackgroundTask<Request, Response>

The kinds of background tasks that your app or extension can handle. Use a value of this type with the ``Scene/backgroundTask(_:action:)`` scene modifier to create a handler for background tasks that the system sends to your app or extension. For example, you can use ``urlSession`` to define an asynchronous closure that the system calls when it launches your app or extension to handle a response from a background <doc://com.apple.documentation/documentation/Foundation/URLSession>.

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

BackgroundTask.urlSession(matching:)

callback cannot propagate synchronous failure

All SwiftUI types →