Flutter IOS Workmanager Background Fetch Never Called in Production


I’m seemingly unable to get background fetch working with Flutter workmanager on IOS.

I can confirm that it is working when called within xcode through debug. Just never when deployed to the device.

I’ve got my workmanager initialised and callback setup in main.dart


        isInDebugMode: true

void callbackDispatcher() 
  Workmanager().executeTask((task, inputData) async 
    return Future.value(true);

I’ve added fetch background mode to info.plist


I’ve added system capabilities to project.pbxproj

SystemCapabilities = {
    com.apple.BackgroundModes = {
        enabled = 1;

I’ve added the plugin to appdelegate.swift

import UIKit
import Flutter
import workmanager

@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {


    return super.application(application, didFinishLaunchingWithOptions: launchOptions)

Be much appreciated if anyone has a working setup.


Ok. For future people reading this with the same issue, this does ‘eventually‘ work.

After having the app open in the background for ~48hrs, I finally got a background task to run. This is by no means a complete success as it is not really at the frequency desired, but this implementation does ‘work‘ none the less.

Just run in debug mode to confirm and be very patient.

Answered By – BadgerHobbs

Answer Checked By – Gilberto Lyons (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *