Tischzeit
An iOS app that calls the family to the table. Swift 6, CloudKit, zero external dependencies.
- Dependencies
- 0
- Platform
- iOS 18+
- Backend
- CloudKit
About the project
A small problem with a surprisingly awkward technical solution: someone cooks, the food is ready, and everyone else is sitting in their rooms with headphones on. Tischzeit sends everyone a call on their phone, a time-sensitive notification that gets through even in Focus mode.
The app runs entirely on Apple frameworks: Swift 6 with strict concurrency checking, SwiftUI, CloudKit as the backend, Swift Testing for tests. Not a single external dependency, no Firebase, no server of my own, no account. The family shares a CloudKit zone, and that is the entire infrastructure.
That is exactly where the interesting problem came from. CloudKit does not support alert pushes in the shared database, only silent notifications. The direct route through the private database works for the owner of the zone, but not for anybody else. The solution is two separate delivery paths: the owner gets a real alert push that a Notification Service Extension enriches, members get a silent push that wakes the app, which then builds the notification locally itself.
To make sure nobody receives two notifications for the same call, the CloudKit layer only forwards the event to the app in the shared-database case. A second trap sits in the same corner: CloudKit cannot address pushes to individual devices, there is only "every subscriber of the zone". So calling again would notify you as well, which is why each device decides for itself whether a notification is shown.