Instance Property

backgroundTimeRemaining

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

Declaration

@property(nonatomic, readonly) NSTimeInterval backgroundTimeRemaining;

Discussion

This property contains the amount of time the app has to run in the background before it may be forcibly killed by the system. While the app is running in the foreground, the value in this property remains suitably large. If the app starts one or more long-running tasks using the beginBackgroundTaskWithExpirationHandler: method and then transitions to the background, the value of this property is adjusted to reflect the amount of time the app has left to run.

See Also

Managing Background Execution

backgroundRefreshStatus

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

UIBackgroundRefreshStatus

Constants indicating whether background execution is enabled for the app.

UIApplicationBackgroundRefreshStatusDidChangeNotification

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

- beginBackgroundTaskWithName:expirationHandler:

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

- beginBackgroundTaskWithExpirationHandler:

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

- endBackgroundTask:

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

UIBackgroundTaskIdentifier

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