SwiftDataServer Documentation

SwiftDataServer brings Apple's SwiftData API to server-side Swift. Define your models once and use them on iOS, macOS, and your Vapor server with PostgreSQL, MySQL, or SQLite backends.

Key Features

  • 100% API Compatible - Use the same @Model, #Predicate, FetchDescriptor, and ModelContext APIs you know from SwiftData
  • Multiple Backends - PostgreSQL, MySQL, and SQLite support with automatic migrations
  • Swift 6 Ready - Full concurrency support with Swift 5 compatibility
  • Vapor Integration - First-class support for request-scoped contexts
  • Share Models - Define models once, use on iOS/macOS and server

Requirements

  • Swift 5.10+ (Swift 6 supported)
  • macOS 14+ or Linux
  • PostgreSQL 14+, MySQL 8+, or SQLite 3.35+

Getting Help

If you need help or have questions: