2

I'm I obliged to pass either UIApplicationBackgroundFetchIntervalMinimum or UIApplicationBackgroundFetchIntervalNever ?

Or Is it possible to pass a custom interval instead, for example 10 minutes:

UIApplication.sharedApplication().setMinimumBackgroundFetchInterval(600.0)

In my App, I have to download some new updated data while the app is in the background.

Then I'll use the new data to send a local notification to the user.

AziCode
  • 2,510
  • 6
  • 27
  • 53

1 Answers1

1

I looked up apis and found this:

func setMinimumBackgroundFetchInterval(_ minimumBackgroundFetchInterval: NSTimeInterval)

And there is a tip for this:

The minimum number of seconds that must elapse before another background fetch can be initiated. This value is advisory only and does not indicate the exact amount of time expected between fetch operations.

So I think you'd better not depend on that time interval.

Lumialxk
  • 6,239
  • 6
  • 24
  • 47