Instance Method

setTaskCompleted(success:)

Informs the background task scheduler that the task is complete.

Declaration

func setTaskCompleted(success: Bool)

Parameters

success

A Boolean indicating if the task completed successfully or not.

Discussion

Not calling setTaskCompleted(success:) before the time for the task expires may result in the system killing your app.

You can reschedule an unsuccessful required task.

See Also

Configuring a Task

var expirationHandler: (() -> Void)?

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