Background fetch is a React Native module that provides periodic background data fetching on iOS and Android. Current stable version is 4.4.2. It leverages native APIs (iOS BGTaskScheduler, Android JobScheduler/AlarmManager) to schedule minimal background tasks, not guaranteed to run at fixed intervals. Key differentiators: reliable cross-platform API, support for headless JS tasks, Expo config plugin, and TypeScript types. Alternative to react-native-background-actions but more battery-friendly.
npm install react-native-background-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures background fetch with a 15-minute minimum interval and headless JS support.
For RN < 0.68, use react-native link or CocoaPods. Upgrade to v4 for RN 0.68+ autolinking.
Do not rely on exact intervals; assume background fetch may be delayed or combined.
Use BackgroundFetch.on('fetch', callback) instead.Add device-specific battery optimization whitelist instructions in docs.
Use import BackgroundFetch from 'react-native-background-fetch' instead of const BackgroundFetch = require('react-native-background-fetch').Always call BackgroundFetch.finish(taskId) after async work.
Use configure() return value or BackgroundFetch.getStatus() API.
Use: import BackgroundFetch from 'react-native-background-fetch'
Run: cd ios && pod install && cd .. . For RN < 0.68, also run: react-native link react-native-background-fetch
Ensure BackgroundFetch is imported as default and finish is called within event handler after work.
Use unique task IDs or call BackgroundFetch.stop(taskId) before re-registering.
npm install @expo/config-plugins@>=10.0.0