RivetKit Swift client guidance. Use for Swift clients that connect to Rivet Actors with RivetKitClient, create actor handles, call actions, or manage connections.
The `rivetkit-client-swift` skill provides a comprehensive guide and tooling for developers building Swift clients that interact with Rivet Actors via the RivetKitClient. It addresses the challenge of connecting to and managing remote actors, allowing developers to easily create actor handles, invoke actions, and manage both stateless and stateful connections. By offering a standardized approach to actor interaction, this skill streamlines client-side operations, reduces boilerplate code, and ensures consistent error handling throughout Swift applications.
You can add the RivetKit Swift client as a package dependency in your Package.swift file and import `RivetKitClient` in your Swift code. Ensure you use a version compatible with your project, such as 2.0.0 or later.
Yes. The client supports stateless calls where each action is independent, as well as stateful connections that keep a session open for real-time event streaming using AsyncStream.
The skill recommends a fail-fast approach by default. Broad do/catch blocks should be avoided unless necessary, and any caught errors should be explicitly handled, for example, by logging them.
Yes. The action calls support positional overloads for up to 5 arguments. For more than 5 arguments, developers should use the raw JSON fallback to pass parameters.
The documentation specifies compatibility with RivetKit version 2.2.0. Ensure your server-side actors and endpoints are running a compatible version to avoid connection issues.
Quick Setup:
.claude/skills/Repository
rivet-dev/skills