Constants indicating whether background execution is enabled for the app.


enum UIBackgroundRefreshStatus : Int



case restricted

Background updates are unavailable and the user cannot enable them again. For example, this status can occur when parental controls are in effect for the current user.

case denied

The user explicitly disabled background behavior for this app or for the whole system.

case available

Background updates are available for the app.

See Also

Managing Background Execution

var backgroundRefreshStatus: UIBackgroundRefreshStatus

Indicates whether the app can refresh content when running in the background.

class let backgroundRefreshStatusDidChangeNotification: NSNotification.Name

Posted when the app’s status for downloading content in the background changes.

func beginBackgroundTask(withName: String?, expirationHandler: (() -> Void)?) -> UIBackgroundTaskIdentifier

Marks the beginning of a new long-running background task with the specified name.

func endBackgroundTask(UIBackgroundTaskIdentifier)

Marks the end of a specific long-running background task.

struct UIBackgroundTaskIdentifier

A unique token that identifies a request to run in the background.

var backgroundTimeRemaining: TimeInterval

The amount of time the app has to run in the background.