user836026
user836026

Reputation: 11362

How long time usually application is given to finish in background (backgroundTimeRemaining)

I need to get user location update when application is in background. I used "significant change feature" but the problem with significant change it's not accurate.

Hence, to improve accuracy of "significant change" a "little bit" I'm thinking to complement this with UIApplication:beginBackgroundTaskWithExpirationHandler:.

Thus, my question is how long usually application is given (the value in backgroundTimeRemaining) to run in background.

Upvotes: 2

Views: 1752

Answers (2)

sash
sash

Reputation: 8747

For iOS 7 and later the background task time is around 3 min

Upvotes: 2

Ole Begemann
Ole Begemann

Reputation: 135588

Currently (as of iOS 5), the maximum time an app can remain in the background to finish tasks is 10 minutes. This can change in future iOS releases. You can check the value for yourself by logging the return value of [[UIApplication sharedApplication] backgroundTimeRemaining] when your app enters the background.

Upvotes: 4

Related Questions