rivetkit-client-swiftui
SwiftUI client library for connecting to Rivet Actors with reactive bindings and event streaming.
- Provides
@Actorproperty wrapper for get-or-create semantics with connection lifecycle management, plus view modifiers for environment setup and event subscription - Supports typed async actions, fire-and-forget sends, and AsyncStream event subscriptions with 0–5 typed arguments
- Includes connection status tracking, error handling via
ActorError, and compound key support for hierarchical actor addressing - Requires single
.rivetKit(endpoint:)or.rivetKit(client:)call at app root; reads optional config from environment variables (RIVET_NAMESPACE,RIVET_TOKEN,RIVET_RUNNER)
RivetKit SwiftUI Client
Use this skill when building SwiftUI apps that connect to Rivet Actors with RivetKitSwiftUI.
Version
RivetKit version: 2.3.0-rc.5
Error Handling Policy
- Prefer fail-fast behavior by default.
- Avoid broad
do/catchunless absolutely needed. - If a catch block is used, handle the error explicitly, at minimum by logging it.
Install
Add the Swift package dependency and import RivetKitSwiftUI:
More from rivet-dev/skills
sandbox-agent
Deploy, configure, and integrate Sandbox Agent - a universal API for orchestrating AI coding agents (Claude Code, Codex, OpenCode, Amp) in sandboxed environments. Use when setting up sandbox-agent server locally or in cloud sandboxes (E2B, Daytona, Docker), creating and managing agent sessions via SDK or API, streaming agent events and handling human-in-the-loop interactions, building chat UIs for coding agents, or understanding the universal schema for agent responses.
6.1Krivetkit
RivetKit backend and Rivet Actor runtime guidance. Use for building, modifying, debugging, or testing Rivet Actors, registries, serverless/runner modes, deployment, or actor-based workflows.
5.7Krivetkit-client-javascript
RivetKit JavaScript client guidance. Use for browser, Node.js, or Bun clients that connect to Rivet Actors with rivetkit/client, create clients, call actions, or manage connections.
5.5Krivetkit-client-react
RivetKit React client guidance. Use for React apps that connect to Rivet Actors with @rivetkit/react, create hooks with createRivetKit, or manage realtime state with useActor.
5.5Krivetkit-client-swift
RivetKit Swift client guidance. Use for Swift clients that connect to Rivet Actors with RivetKitClient, create actor handles, call actions, or manage connections.
5.3Kmultiplayer-game
Pragmatic patterns for building multiplayer games: matchmaking, tick loops, realtime state, interest management, and validation.
4.6K