Skip to content

Commit 0973b70

Browse files
mahdidavoodi7claude
andcommitted
docs: restructure the README top
Preview first, then a Features list, Installation, Usage — the shape readers expect from a React Native package. The dev-build note moves into Installation where it is actionable, and the platform table sits under Features as supporting detail rather than above the fold. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent a63e89e commit 0973b70

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

‎README.md‎

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@
22

33
Run user-initiated work that keeps going after the user leaves your app — a large export, an upload, a batch encode — behind one cross-platform API.
44

5-
| Platform | Backed by |
6-
| ------------------- | ------------------------------------------------------------------- |
7-
| iOS 26+ | `BGContinuedProcessingTask`, with the system-provided Live Activity |
8-
| Android (minSdk 24) | WorkManager `CoroutineWorker` running as a foreground service |
9-
10-
This is not a general "run some code in the background" library. Both platforms only grant this kind of runtime to work the **user just asked for**, both show the user UI they can cancel from, and both will kill work that looks stalled. The API is shaped around those constraints rather than hiding them.
11-
12-
> **Requires a dev build.** Nitro modules never work in Expo Go.
13-
145
## Preview
156

167
The example app, **Motionary**, uploading new animations. The work was started by a tap in the app; both recordings are of the task continuing after the app was left — the system draws this UI, not the library.
@@ -32,12 +23,32 @@ To record your own: run the example app, scroll to the **Preview** card at the b
3223

3324
> Apple's [WWDC25 session 227, _Finish tasks in the background_](https://developer.apple.com/videos/play/wwdc2025/227/), demonstrates the underlying iOS behaviour. Watch it for the behaviour, not the code — its samples do not compile against the shipping SDK (see [SDK verification](#sdk-verification-2026-08-31)).
3425
26+
## Features
27+
28+
- 📱 One API over iOS 26's [`BGContinuedProcessingTask`](https://developer.apple.com/documentation/backgroundtasks/bgcontinuedprocessingtask) and Android's WorkManager foreground services
29+
- 🔔 System-drawn progress UI — a Live Activity on iOS, an ongoing notification on Android — that the **user can cancel from**
30+
- 📊 Progress reporting that is load-bearing, not decoration: iOS expires tasks that report none
31+
- ♻️ `getKnownTasks()` reconciles work lost when the app is swiped away — the only way to detect it on iOS, which reports it no other way
32+
- 🧭 Typed submit errors and stop reasons, each carrying the raw platform domain and code instead of one generic failure
33+
- 🧩 Expo config plugin for the `Info.plist`, entitlement and `AndroidManifest` wiring
34+
- ✅ Verified on a real device — [13/13 on iOS 26.6.1](docs/device-qa-runs/2026-09-01-ios-26.6.1.md)
35+
- 🔥 Powered by [Nitro Modules](https://nitro.margelo.com)
36+
37+
> This is not a general "run some code in the background" library. Both platforms only grant this runtime to work the **user just asked for**, both show UI they can cancel from, and both kill work that looks stalled. The API is shaped around those constraints rather than hiding them.
38+
39+
| Platform | Backed by |
40+
| ------------------- | ------------------------------------------------------------------- |
41+
| iOS 26+ | `BGContinuedProcessingTask`, with the system-provided Live Activity |
42+
| Android (minSdk 24) | WorkManager `CoroutineWorker` running as a foreground service |
43+
3544
## Installation
3645

3746
```sh
3847
npm install react-native-continued-task react-native-nitro-modules
3948
```
4049

50+
> **Requires a dev build.** Nitro modules never work in Expo Go.
51+
4152
`react-native-nitro-modules` is an _optional_ peer dependency, so npm and yarn resolve the single copy your app already has instead of nesting a second one. A nested second copy crashes at startup with `Nitro was installed twice`.
4253

4354
### Expo
@@ -62,7 +73,7 @@ Add the config plugin and declare the identifier prefixes your app will submit u
6273

6374
Then `npx expo prebuild`. The plugin writes `BGTaskSchedulerPermittedIdentifiers` on iOS (expanding each prefix to `<prefix>.*`), the GPU entitlement when `enableGPU` is set, and on Android the foreground-service permissions plus the merged `SystemForegroundService` block. See [Config plugin](#config-plugin) for the full option list and the bare-workflow equivalents.
6475

65-
## Quick start
76+
## Usage
6677

6778
```ts
6879
import {

0 commit comments

Comments
 (0)