Share your SwiftData models between iOS apps and Vapor servers. Write once, run everywhere with 100% API compatibility.
Define your models once and use them on iOS, macOS, and your Vapor server.
// Works on iOS, macOS, and Server
@Model
final class User {
var name: String
@Attribute(.unique)
var email: String
@Relationship(deleteRule: .cascade)
var posts: [Post] = []
init(name: String, email: String) {
self.name = name
self.email = email
}
}
Use the same @Model, #Predicate, FetchDescriptor, and ModelContext APIs you know from SwiftData.
PostgreSQL, MySQL, and SQLite backends. Choose the database that fits your needs.
First-class Vapor support with request-scoped contexts and automatic migrations. Swift 6 ready, Swift 5 compatible.
Full support for one-to-many and many-to-many relationships with automatic join tables.
Schema changes are detected and applied automatically. No manual migration files to write or maintain.
Filter queries with #Predicate macros. Type-safe, composable, and identical to Apple's SwiftData syntax.
Ship your full-stack Swift app faster with shared models.
Purchase License - $500