On this page
Overview
Starscream is a Swift WebSocket client library conforming to RFC 6455. It provides nonblocking background processing, TLS/WSS, RFC 7692 compression, and delegate or closure handling for text, binary, ping, pong, connection, and error events.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Handle connection and message lifecycle through WebSocketEvent
Create a WebSocket from URLRequest, call connect, and receive connected, disconnected, text, binary, ping/pong, and error events through didReceive or onEvent. The socket instance must remain retained while the connection is active.
Sources: [2]
Configure TLS/WSS, headers, compression, and callback queues
The client supports custom headers and protocols, timeouts, certificate pinning hooks, RFC 7692 compression, and a configurable callback queue while network processing itself remains on background threads.
Sources: [2]
Best fit
Fits chat and realtime applications that need bidirectional communication
It is useful when an iOS client needs continuous server events plus bidirectional text or binary frames rather than request/response HTTP alone.
Sources: [2]
Before adoption
The latest release is from 2024, so verify it with current Swift and Xcode
The latest GitHub release is 4.0.8 from March 2024 and Package.swift uses Swift tools 5.3. The repository was last pushed in May 2024, so current Swift/Xcode builds, concurrency behavior, and TLS configuration should be verified before adoption.
Official sources
- [1]daltoniam/Starscream — GitHub repository(2026-10-06)
- [2]Starscream 4.0.8 — README(2026-10-06)
- [3]Starscream 4.0.8 — Package.swift(2026-10-06)
- [4]Starscream 4.0.8 release(2026-10-06)
- [5]Starscream Apache-2.0 license(2026-10-06)
Supplemental curator note
Starscream fits iOS chat and realtime applications that need bidirectional WebSocket communication. Its latest release and last repository push are from 2024, so test it with current Swift/Xcode, concurrency, and TLS settings before adoption.
Try it in 3 steps
- 1
Add Starscream 4.0.8 with SwiftPM
Pin the latest GitHub release and verify compatibility with the current Swift/Xcode toolchain in CI.
.package(url: "https://github.com/daltoniam/Starscream.git", exact: "4.0.8") - 2
Create and connect a WebSocket
Retain the socket instance and connect to a WSS endpoint.
import Starscream var request = URLRequest(url: URL(string: "wss://example.com/socket")!) request.timeoutInterval = 5 let socket = WebSocket(request: request) socket.connect() - 3
Handle text and binary events with onEvent
Read the WebSocketEvent stream and process the text and binary cases needed by the application.
socket.onEvent = { event in switch event { case .text(let value): print(value) case .binary(let data): print(data.count) default: break } }
Growth
Growth trends · Last 30 days
8,641 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 0
- Open PRs
- 26
Development activity is still being collected.
Built with
Categories and tags
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- starscream
- swift
- websocket-client
- osx
- websocket
- websockets
- protocol
- Stars
- 8,641
- Forks
- 1,257
- Watchers
- 132
- Open issues
- 146
- Contributors
- 100
- Owner type
- User
- Primary language
- Swift
- License
- Apache-2.0
- Repository last updated
- May 16, 2024
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Nuke8,676 Stars
3 shared tag(s) · 2 shared category(s) · Same language
load, process, and cache remote images through ImagePipeline for SwiftUI and UIKit
Swift - SwiftUI Introspect6,559 Stars
3 shared tag(s) · 2 shared category(s) · Same language
access the UIKit or AppKit components underneath SwiftUI views through public APIs
Swift - DeviceKit4,733 Stars
3 shared tag(s) · 2 shared category(s) · Same language
augment UIDevice with value-typed device models, simulator detection, battery state, and hardware capabilities
Swift - Apollo iOS4,037 Stars
3 shared tag(s) · 2 shared category(s) · Same language
generate type-safe Swift models from GraphQL and combine queries with normalized caching
Swift - Flutter179,343 Stars
3 shared tag(s) · 2 shared category(s)
build mobile, web, and desktop UI from one Dart codebase
Dart - React Native126,797 Stars
3 shared tag(s) · 2 shared category(s)
native mobile UI with React, stable 0.87.1, and a framework-first path
C++
Report incorrect information
Tell us if any listing information is incorrect or outdated.