EasyBackgroundRefresh 1.0.4

EasyBackgroundRefresh 1.0.4

Maintained by Yonat Sharon.

  • By
  • Yonat Sharon


Easy background refresh registration, scheduling, execution, and completion. BGTaskScheduler for the lazy.

Swift Version License CocoaPods Compatible Platform PRs Welcome


For fast refreshes:

struct MyApp: App {

    let backgroundRefresh = EasyBackgroundRefresh(autoCompleteDelay: 3) { _ in
        // quickly refresh your data in less than autoCompleteDelay seconds

For longer refreshes:

struct MyApp: App {

    let backgroundRefresh = EasyBackgroundRefresh { backgroundRefresh in
        backgroundRefresh.isProcessing = true
        defer { backgroundRefresh.isProcessing = false }
        // refresh your data, take up to 30 seconds


Remember to enable background refresh and add Info.plist keys as described in Apple docs.

By default, EasyBackgroundRefresh uses your app Bundle ID as the background task ID. You can change that by passing a different value to init:

let backgroundRefresh = EasyBackgroundRefresh(taskIdentifier: "io.another.identifier")



pod 'EasyBackgroundRefresh'

Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/yonat/EasyBackgroundRefresh", from: "1.0.1")