an alternative to SwiftData, built with Fluent
- Multiple storage options:
- Memory: database starts fresh everytime, no data persist across app launches
- File: database is stored locally on device
- iCloud: database is synced via the iCloud settings of the device (works only on iOS and macOS)
- Bundle: database is loaded from a file in the bundle, it will be loaded in read-only mode
- Migrations: so your data model can painlessly evolve with your application
- Query result updates with Combine: update your views automatically when database gets updated
- Middlewares: execute code when data is inserted, updated and/or deleted
- Compatible with Alexey Naumov's vision of Clean Architecture for SwiftUI.
To install FluentData you can follow the tutorial published by Apple using the URL for the FluentData repo with the current version:
- In Xcode, select “File” → “Add Packages...”
- Enter https://github.com/Beam-Studio/FluentData.git
or you can add the following dependency to your Package.swift
:
.package(url: "https://github.com/Beam-Studio/FluentData.git", from: "main")
To learn how to use FluentData, you can have a look at the documentation of FluentData here.
There also is an example project to demonstrate how to use FluentData following the Clean architecture as described by Alexey Naumov.
This project is released under the MIT license.