0.1.1 • Published 3 years ago
@soreine/react-native-begin-background-task v0.1.1
@soreine/react-native-begin-background-task
⚠️ Note: This only works on iOS and will be ignored on other platforms.
Installation
npm i @soreine/react-native-begin-background-task
then...
npx pod-install
Usage
import { beginBackgroundTask, endBackgroundTask } from '@soreine/react-native-begin-background-task';
// ...
const backgroundTaskId = await beginBackgroundTask();
// Your task that you want to keep running if the app goes to the background...
await endBackgroundTask(backgroundTaskId)
0.1.1
3 years ago