Repository navigation
Releases
Releases · LosFarmosCTL/swift-twitch-client
swift-twitch-client 1.1.0
Features
- Normalized
ChatMessage.isActionand orderedChatMessage.emotesacross IRC and EventSub. Emote ranges use Unicode scalar offsets intoChatMessage.text, which omits CTCP framing for EventSub/memessages. - Signed-out
TwitchClient(chat:urlSession:diagnostics:)initializer andclearCredentials(chatBehavior:)for public Helix and anonymous IRC usage.
Fixes
- Verify IRC
room-idtags against active memberships, evict stale channel aliases on rename, and ignore late reader traffic after parting. - Fix races when retrying/rejoining failed IRC channels, withdrawing in-flight ID joins by login, and reusing failed IRC writers.
- Report
ChatState.writeras.unavailableand failsendMessage(in:)before channel lookup when using non-user credentials.
swift-twitch-client 1.0.0
First stable release of swift-twitch-client, targeting Swift 6.4+ in Swift 6 language mode on macOS 13+, iOS 16+, tvOS 16+, watchOS 9+, visionOS 1+, and Linux.
Highlights
- Helix API: Full typed coverage of Twitch Helix endpoints via async/await (
helix(for:)) and callbacks (helixTask(for:completionHandler:)), one-off static requests, per-response HTTP/rate-limit metadata, and typed HTTP 429 (HelixError.rateLimited) handling. - Authentication: Support for user OAuth tokens, app OAuth tokens, Extension Backend Service JWTs, OAuth token validation (
validateAccessToken), and live credential rotation (switchCredentials(to:chatBehavior:)). - EventSub: Pooled WebSocket client supporting
AsyncThrowingStream, callbacks, and Combine publishers with automatic welcome handshakes, keepalives, seamlesssession_reconnecthandoffs, shared upstream subscriptions, and custom topic decoding. - Managed Chat & Raw IRC: Unified managed chat supporting authenticated IRC, anonymous IRC, and EventSub readers; Helix and IRC writers; process-local send pacing; opt-in EventSub moderation enrichment; and direct raw IRC stream/callback/Combine/send access powered by
TwitchIRC2.1. - Diagnostics & SemVer-safe models: Opt-in structured decoding diagnostics (
TwitchDiagnostics/decodingDiagnostics()), openRawRepresentablewire-decoded value types that preserve unfamiliar Twitch values, explicit public initializers across public models, and localized error descriptions viaLocalizable.xcstringson Apple platforms.
Installation
.package(url: "https://github.com/LosFarmosCTL/swift-twitch-client.git", from: "1.0.0")Add the product to your target:
.product(name: "Twitch", package: "swift-twitch-client")