Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.
Loading
Loading