A sync layer for SwiftData apps that handles JSON-to-model mapping, deterministic diffing, and reactive local reads.
SwiftSync is a synchronization layer for SwiftData applications that automates the process of converting JSON data from a backend API into SwiftData models and vice versa. It solves the problem of manually writing repetitive sync logic by providing deterministic diffing, automatic relationship handling, and reactive local reads, allowing developers to focus on building their app's features rather than data synchronization boilerplate.
iOS and macOS developers building SwiftData-based applications that need to sync data with a backend API, particularly those using SwiftUI or UIKit who want reactive, automatic UI updates when data changes.
Developers choose SwiftSync because it eliminates the need to write custom sync code for every model, provides a convention-first approach that reduces configuration, and integrates seamlessly with SwiftData and SwiftUI for a reactive, local-first data flow.
JSON to SwiftData and back. SwiftData Sync.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically maps JSON keys to SwiftData properties based on naming conventions, significantly reducing manual configuration as shown in the property mapping examples.
Uses deterministic diffing to calculate and apply inserts, updates, and deletes between JSON payloads and the local store, optimizing sync performance.
Manages nested objects and foreign keys for one-to-one and one-to-many relationships without extra code, as demonstrated in the one-to-many and parent-scoped sync sections.
Provides @SyncQuery and @SyncModel property wrappers for SwiftUI and UIKit, enabling automatic UI updates when sync operations modify SwiftData, streamlining reactive data flows.
Exclusively tied to SwiftData, making it incompatible with other persistence layers like Core Data, which limits flexibility for mixed or legacy codebases.
Requires Xcode 17+, Swift 6.2, and iOS 17+/macOS 14+, as stated in the install section, which can block adoption in projects targeting older platforms or Swift versions.
While convention-first, deviations require manual annotations like @RemoteKey for non-standard APIs, adding overhead and potential for errors in complex mapping scenarios.