Skip to content

Bring APNSURLSessionClient to parity: honor injected clock, session injection, user-agent - #251

Merged
kylebrowning merged 1 commit into
mainfrom
fix/urlsession-parity
Jul 14, 2026
Merged

Bring APNSURLSessionClient to parity: honor injected clock, session injection, user-agent#251
kylebrowning merged 1 commit into
mainfrom
fix/urlsession-parity

Conversation

@kylebrowning

Copy link
Copy Markdown
Owner
  • APNSURLSessionClientConfiguration accepted a clock parameter but always used ContinuousClock() — the init is now generic so the injected clock actually drives token refresh.
  • Removes the never-read stored authenticationMethod property (dead state; mutating it did nothing).
  • URLSession is now injectable (defaults to .shared); requests send user-agent: APNS/swift-urlsession like the NIO client's APNS/swift-nio.
  • New tests: full header propagation, 410-with-timestamp, injected-clock token refresh, custom session.

@kylebrowning
kylebrowning force-pushed the fix/urlsession-parity branch from 93238ea to 65966a9 Compare July 14, 2026 05:42
@kylebrowning
kylebrowning force-pushed the fix/urlsession-parity branch from 65966a9 to 4982b5a Compare July 14, 2026 05:47
@kylebrowning
kylebrowning merged commit 9e1ffbd into main Jul 14, 2026
6 checks passed
@kylebrowning
kylebrowning deleted the fix/urlsession-parity branch July 14, 2026 06:13
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.

1 participant