The SurrealDB SDK for Swift enables you to interact with SurrealDB from native Apple-platform applications (iOS, macOS, tvOS, watchOS and visionOS) as well as server-side Swift, allowing you to integrate SurrealDB into your app or backend and serve dynamic content to your users. You can use the Swift SDK to connect over HTTP or WebSocket, execute queries, manage data with type-safe CRUD via the @SurrealModel macro and query DSL, authenticate to the database, build user signup and signin functionality, and subscribe to data changes with live queries delivered as an AsyncStream.
The SDK requires Swift 6.1 or later and works with SurrealDB v3.0.0 or higher.
Supported platforms are iOS 17+, macOS 14+, tvOS 17+, watchOS 10+ and visionOS 1+.
The SDK is distributed via Swift Package Manager from the surrealdb.swift repository, and will also be available on Swift Package Index.
To contribute to the SDK code, submit an Issue or Pull Request in the surrealdb.swift repository. To contribute to this documentation, submit an Issue or Pull Request in the docs.surrealdb.com repository.