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.

Beta
class BGAppRefreshTask

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

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software