Skip to content
pubscout

flutter_background_service_ios

5.0.3, released 2 years ago by maseka.dev

Runs Dart code continuously on iOS even when the app is closed.

WASM-readyQuiet but busy
$ flutter pub add flutter_background_service_ios
Source repository

What it does

Provides an iOS implementation for the flutter_background_service plugin, allowing background execution of Dart code via BGTaskScheduler. It integrates with the federated plugin system so developers only need to depend on flutter_background_service.

AI-written summary of version 5.0.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to run periodic or long‑running Dart tasks on iOS without the UI being active
  • You want a simple way to keep a service alive after the app is terminated

Skip it when

  • You require cross‑platform background execution and need Android support (use the main flutter_background_service package)
  • You need fine‑grained control over native background APIs beyond what the plugin offers

Strengths

  • Easy integration via the endorsed federated plugin
  • Handles iOS background task scheduling and null‑safety
  • Minimal setup for basic use cases

Weaknesses

  • iOS‑only; no Android implementation
  • Limited configurability compared to writing native code yourself

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:flutter_background_service/flutter_background_service.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await FlutterBackgroundService().configure(
    androidConfiguration: AndroidConfiguration(), // ignored on iOS
    iosConfiguration: IosConfiguration(
      onBackground: () async {
        // your background task
        return true;
      },
    ),
  );
  runApp(MyApp());
}

Works with

Packages commonly used together with flutter_background_service_ios: ones it builds on, ones built on it, and its own family.