backgroundTimeRemaining
The maximum amount of time remaining for the app to run in the background.
Declaration
nonisolated var backgroundTimeRemaining: TimeInterval { get }Mentioned in
Discussion
The value is valid only after the app enters the background and has started at least one task using beginBackgroundTask(expirationHandler:) in the foreground.
System conditions may end background execution earlier, either by calling the expiration handler, or by terminating the app.
This method can be safely called on a non-main thread.