Hello! 😊
I currently manage an app called MoneyKeeper that uses SwiftData for its data storage framework. Many users have requested a "sharing" feature, but unfortunately, SwiftData does not yet support this functionality, and it’s unclear when it will. 😭
Initially, I considered using CloudKit and CKSyncEngine to implement quick synchronization and sharing. However, due to the complexity of the current data model’s relationships, modeling it with CloudKit’s schema alone seemed overly complicated and likely to introduce bugs.
As a result, I’ve decided to implement the sharing feature using CoreData and CloudKit. My plan to avoid conflicts with SwiftData includes:
- Keeping the local storage locations for SwiftData and CoreData separate.
- Using entirely separate CloudKit containers for SwiftData and CoreData.
I believe these measures will minimize potential issues, but I’m wondering if there’s anything else I should consider.
Using both SwiftData (for the personal database) and CoreData (for the shared database) feels like it could lead to significant technical debt in the future, and I anticipate encountering even more challenges during actual implementation.
I’d greatly appreciate your valuable insights on this matter. 🙏
The app MoneyKeeper, currently operated using SwiftData. https://apps.apple.com/app/id6514279917