Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
570abc0
feat(android): durable terminal-event journal with ack, size cap, non…
dmurphy5 Jul 23, 2026
cc8fe53
feat(android): journal terminal events, classify outcomes, typed erro…
dmurphy5 Jul 23, 2026
81713fa
feat(android): user-cancel intent, notification defaults + auto chann…
dmurphy5 Jul 23, 2026
e636f57
feat(android): getAllUploads via id-tagged WorkManager query
dmurphy5 Jul 23, 2026
b54c1b5
feat(ios): rewrite native module in Swift (v8)
dmurphy5 Jul 23, 2026
0dcbc2e
chore: remove remaining Vydia references (android package, metadata, …
dmurphy5 Jul 23, 2026
3d8b258
fix(ios): key response buffers by session:taskId to avoid cross-sessi…
dmurphy5 Jul 23, 2026
9b4feaa
feat(js): expose journal get/ack + getAllUploads, typed errors, accep…
dmurphy5 Jul 23, 2026
045822e
chore(v8): packaging, CI, README, CHANGELOG; drop committed lib/
dmurphy5 Jul 23, 2026
5751e6e
example: journal debug buttons and cleaner listeners
dmurphy5 Jul 23, 2026
831383e
fix: address code review — cancel-reason, event parity, iOS errorKind…
dmurphy5 Jul 23, 2026
6c70b99
fix(ios): make RNFileUploader public so ObjC @import can call the bg-…
dmurphy5 Jul 24, 2026
742d28c
fix(ios): make RNFileUploader delegate methods and overrides public
dmurphy5 Jul 24, 2026
3d30854
feat(new-arch)!: convert to a codegen TurboModule
dmurphy5 Jul 24, 2026
be3a614
fix(android): ship consumer ProGuard rules for the Gson-persisted models
dmurphy5 Jul 24, 2026
bde0cc4
fix(ios): stop a slow invalidate from permanently killing event delivery
dmurphy5 Jul 24, 2026
2fc13cc
fix(android): don't journal a terminal cancel for a system stop
dmurphy5 Jul 24, 2026
b3455d8
fix: stop publishing internal files, and type terminal events honestly
dmurphy5 Jul 24, 2026
d3ab887
ci(example): bump the example app to RN 0.84 so codegen can run
dmurphy5 Jul 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 34 additions & 18 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
name: Node Environment
name: CI

on: [push, pull_request]

jobs:
node-lint-tests:
checks:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"

steps:
- name: checkout
uses: actions/checkout@v2

- name: setup node
uses: actions/setup-node@v1
with:
node-version: 20

- name: install node_modules
run: |
yarn install --frozen-lockfile
yarn --cwd example/RNBGUExample install --frozen-lockfile

- name: node lint
run:
yarn lint:ci
- name: checkout
uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: install node_modules
run: |
yarn install --frozen-lockfile
yarn --cwd example/RNBGUExample install --frozen-lockfile

- name: lint
run: yarn lint:ci

- name: typecheck
run: yarn typecheck

- name: js tests
run: yarn test

- name: setup java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: android unit tests
run: |
cd example/RNBGUExample/android
./gradlew :react-native-background-upload:testDebugUnitTest
67 changes: 65 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
Since Version > 5.3.0 we follow semantic versioning.
## 8.0.0

See the [releases](https://github.com/Vydia/react-native-background-upload/releases) page on GitHub for information regarding each release.
Reliability release. Terminal outcomes are now durable and accurately typed, the
iOS module was rewritten in Swift, and the module is a New Architecture
TurboModule.

Breaking:
- **New Architecture only.** The module is now a codegen TurboModule on both
platforms; the legacy bridge (`RCTEventEmitter` / `RCT_EXTERN_MODULE` on iOS,
`ReactPackage` + `RCTDeviceEventEmitter` on Android) is gone, along with any
reliance on RN's legacy-interop layer. Requires React Native >= 0.84 with the
New Architecture enabled, and React >= 19.
- The iOS background-session handler moved from `RNFileUploader` to
`RNBackgroundUpload`: `[RNBackgroundUpload setBackgroundSessionCompletionHandler:
forIdentifier:]`. `RNFileUploader` is now the TurboModule and is intentionally
unreachable from plain Objective-C (its generated header is Objective-C++ only).
Update the AppDelegate snippet — see README.
- Events are delivered through the codegen event emitters rather than
`DeviceEventEmitter`, so they are no longer visible under the raw
`RNFileUploader-*` device-event names. The `Upload.addListener(...)` API is
unchanged.
- `cancelUpload` on iOS now resolves `false` when no matching in-flight upload was
found (it previously always resolved `true`). Android still always resolves `true`.
- Terminal event payloads are typed as the journal entry they actually are. The
natives emit the journaled entry itself, so `CompletedData` / `ErrorData` /
`CancelledData` now declare the `eventId`, `type` and `timestamp` they were always
sending, plus `responseBodyTruncated`. `eventId` in particular means you can
`ackEvents([eventId])` straight after handling a live event. `JournaledEvent` is
now a union discriminated on `type`.
- `CompletedData.responseCode` and `.responseBody` are optional. They were declared
required but are absent when a task completes without an HTTP response, so reading
them unguarded could throw.
- The `cancelled` payload no longer carries `error` (it used to hold the cancellation
error string). Use `cancelReason` instead.
- iOS `progress` reports `0` instead of `-1` when the total length is unknown,
matching Android and the documented 0-100 range.
- iOS `getAllUploads` reports `cancelled` and `completed` states instead of
collapsing everything non-running into `pending`.
- `completed` fires only for 2xx responses (plus a request's `acceptStatus`, e.g.
`acceptStatus: [409]`). Every other HTTP response now emits an `error` with
`errorKind: 'http'` and the full response attached (previously reported as
`completed`).
- `error` events are typed: `errorKind: 'http' | 'network' | 'file' | 'unknown'`.
- Native module renamed to `RNFileUploader` on both platforms (was
`VydiaRNFileUploader` on iOS); Android package is now `ai.openspace.backgroundupload`.
- iOS AppDelegate must forward `handleEventsForBackgroundURLSession` (see README).
- Removed the committed `lib/` build output; types are served from `src`
(deep imports of `lib/*` break — import from the package root).
- Minimum iOS deployment target is 15.1; minimum Android SDK is 29. Minimum React
Native is 0.84 (New Architecture), minimum React is 19.
- Removed non-functional iOS code paths: multipart, `assets-library://`, and the
`appGroup` option (a no-op even before this — it mutated the session config after
creation, which URLSession ignores; also removed from the TypeScript options).
- Removed the unexposed Android `stopAllUploads`.

Added:
- Durable native event journal: `getUnacknowledgedEvents()` / `ackEvents(ids)` —
terminal events survive app death and JS reloads (at-least-once delivery).
- `getAllUploads()` on both platforms.
- `cancelled` events carry `cancelReason: 'user' | 'system'`.
- `responseHeaders` on completed events on iOS (was Android-only).
- iOS progress events throttled to 500ms; UUID default upload ids.
- Android `android` options are now optional — sensible notification defaults and
a library-created notification channel.

Earlier releases: see the [releases](https://github.com/openspacelabs/react-native-background-upload/releases) page.
9 changes: 3 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
## Issues

Along with a bug report, provide a functional example repository which
reproduces the bug you're experiencing. We've made this very easy by providing
a full-stack (React Native + Express.js) example app, which you can fork and
alter to reproduce your bug:

[ReactNativeBackgroundUploadExample](https://github.com/Vydia/ReactNativeBackgroundUploadExample)
Along with a bug report, provide a functional reproduction using the full-stack
(React Native + Express.js) example app in this repo under `example/` — fork and
alter it to reproduce your bug.
Loading
Loading