• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-swift / 22873381715
80%

Build:
DEFAULT BRANCH: main
Ran 09 Mar 2026 08:47PM UTC
Jobs 1
Files 86
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Mar 2026 08:30PM UTC coverage: 80.157% (-0.2%) from 80.34%
22873381715

push

github

web-flow
fix(realtime): use URLRequest headers instead of httpAdditionalHeaders for WebSocket (#920)

* fix(realtime): store continuation before resuming WebSocket task

The `connect()` method called `task.resume()` before storing the
`CheckedContinuation`. If the connection fails quickly (common on iOS
with certain network conditions), the delegate fires before the
continuation is set, causing either a force-unwrap crash or a silently
dropped error.

This change stores the continuation first, then resumes the task,
ensuring the delegate callbacks always have a valid continuation to
resume.

Fixes #919

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(realtime): use URLRequest headers instead of httpAdditionalHeaders for WebSocket

Setting headers via `URLSessionConfiguration.httpAdditionalHeaders` interferes
with the WebSocket upgrade handshake on iOS, causing -1005 "The network
connection was lost" errors. This is a known iOS limitation where
httpAdditionalHeaders can corrupt the HTTP upgrade negotiation.

The fix passes headers via URLRequest instead, which works correctly with
URLSessionWebSocketTask.

Verified by A/B testing on iOS:
- httpAdditionalHeaders on config → immediate -1005 failure
- Same headers on URLRequest → successful connection, held for 60s+

Also includes the previous fix: store continuation before calling resume()
to prevent a race condition in the delegate callback.

Fixes #919

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: preserve WebSocket subprotocol negotiation when using URLRequest headers

When headers are provided and we create a URLRequest instead of using
the URL-based webSocketTask API, the protocols parameter was silently
dropped. Set the Sec-WebSocket-Protocol header manually to preserve
subprotocol negotiation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: run swift-format on URLSessionWebSocket.swift

Fix line length violation flagged by CI format check.

---------

Co... (continued)

0 of 22 new or added lines in 2 files covered. (0.0%)

6334 of 7902 relevant lines covered (80.16%)

27.55 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
78.82
0.3% Sources/Realtime/RealtimeClientV2.swift
21
0.0
0.0% Sources/Realtime/WebSocket/URLSessionWebSocket.swift
Jobs
ID Job ID Ran Files Coverage
1 22873381715.1 09 Mar 2026 08:46PM UTC 86
80.16
GitHub Action Run
Source Files on build 22873381715
  • Tree
  • List 86
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22873381715
  • 47969d52 on github
  • Prev Build on main (#22304074981)
  • Next Build on main (#23296376626)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc