Class

BGTask

An abstract class representing a task that’s run while the app is in the background.

Declaration

class BGTask : NSObject

Topics

Reading Task Information

var identifier: String

The string identifier of the task.

Configuring a Task

var expirationHandler: (() -> Void)?

A handler called shortly before the task’s background time expires.

func setTaskCompleted(success: Bool)

Informs the background task scheduler that the task is complete.

Relationships

Inherits From

Conforms To

See Also

Task Management

class BGProcessingTask

A time-consuming processing task that runs while the app is in the background.

class BGAppRefreshTask

An object representing a short task typically used to refresh content that’s run while the app is in the background.