Before you can use this SDK in your Swift applications, you need to add it as a dependency and import it into your project. The SDK is distributed via Swift Package Manager.
Note
Install the SDK
Using Package.swift
Add the package to the dependencies array of your Package.swift, then add the SurrealDB product to the dependencies of your target:
Using Xcode
Open your project and choose File → Add Package Dependencies…
Enter the repository URL
https://github.com/surrealdb/surrealdb.swift.gitin the search field.Select a dependency rule (for example Up to Next Major Version) and click Add Package.
Choose the
SurrealDBlibrary product and add it to your application target.
Import the SDK
Once the package is resolved, import it wherever you need it:
Next steps
See the getting started guide to connect to a database and run your first query.