Skip to content

Wire up progress after re-launch using URLSession delegate#228

Open
samsonjs wants to merge 1 commit into
tus:mainfrom
1SecondEveryday:progress-wiring
Open

Wire up progress after re-launch using URLSession delegate#228
samsonjs wants to merge 1 commit into
tus:mainfrom
1SecondEveryday:progress-wiring

Conversation

@samsonjs
Copy link
Copy Markdown

@samsonjs samsonjs commented May 4, 2026

Rather than using KVO on the task to monitor progress, we now use URLSession's delegate method which can survive a relaunch. There's no way to reconstruct the upload task so this is the only durable method. KVO observation is kept as a compatibility fallback for the deprecated TUSClient.init that accepts a URLSession.

Adds some tests and cleans up the progress callback registry. More can be cleaned up after TUSClient.init(session:) is removed.

Disclosure: assisted by Claude Code and Codex

Closes #227

Rather than using KVO on the task to monitor progress, we now use
URLSession's delegate method which can survive a relaunch. There's no
way to reconstruct the upload task so this is the only durable method.

Adds some tests and cleans up the progress callback registry.

Disclosure: assisted by Claude Code and Codex

Closes tus#227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Progress updates lost after relaunching an app

1 participant