B.V.
B.V.

Reputation: 73

Before iOS7 was it possible to execute background task if it didnt involve audio, location etc

Apple has provided certain services which can run in the background for 10 minutes, but what if I have to perform some other task like downloading a file ... how much time limit do I get for it

Upvotes: 0

Views: 107

Answers (3)

Andrey
Andrey

Reputation: 1561

Before iOS 7 you could request up to 10 minutes of background time (via beginBackgroundTaskWithExpirationHandler:) or you could use any of the background modes available at the time (such as location, voip, etc).

VoIP handler, for instance, will be called at most every 10 minutes and will give up to 3 minutes of background time IIRC.

With iOS 7 you can download and upload files out-of-process, without your app running. Please check documentation on NSURLSession and NSURLSessionConfiguration.

Upvotes: 1

rckoenes
rckoenes

Reputation: 69469

You can request a Executing a Finite-Length Task in the Background which will run in background for maximum 10 min. This should be long enough to download file.

So no it is not just for certain services, you can get your app running the background for a longer period of time if your app is a VOIP app, track user location, playing audio or your app is app for an external accessories.

Upvotes: 0

TheEye
TheEye

Reputation: 9346

You can do it (directly after your app went to the background, that is, not let's say an hour later), and you approx. do have 10 minutes, although that is not guaranteed. See here in the apple documentation:

https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html#//apple_ref/doc/uid/TP40007072-CH4-SW20

Upvotes: 0

Related Questions