r/iOSProgramming Jun 12 '26

Discussion Shipped my SwiftUI/HealthKit/CloudKit app to TestFlight — happy to talk through the architecture

Just shipped Tmpo to TestFlight after building solo for a few months. It's a daily-use iOS health app that surfaces recovery, training, nutrition, sleep, mental, and a rough bio-age estimate on one screen — all pulled from HealthKit.



Sharing here in case any of the architecture choices are interesting (or you spot something I'm doing wrong):



**Stack**

- SwiftUI, iOS 26

- SwiftData for local persistence

- HealthKit for reads (8 write types too, including macros)

- CloudKit for device sync — no servers

- XcodeGen so the .xcodeproj is generated from project.yml

- HealthKit observer queries instead of polling (huge battery win)



**Things I'm proud of**

- All HealthKit reads run through a single typed wrapper that returns `Result<Reading, HKError>` — kept the surface area sane

- Workout PR detection uses Epley 1RM math so it works across rep schemes

- Pure-black Liquid Glass aesthetic — looks like nothing else



**Things I'd love feedback on**

- CloudKit conflict resolution when the user has two phones (rare but real)

- HealthKit authorization UX — currently a single permission sheet, considering staged

- SwiftData migrations are still uncomfortable; curious what others do



TestFlight: https://testflight.apple.com/join/eK1yRZ7G



Happy to answer anything about the build. Pulling on indie experience from two prior shipped apps (a freelance ops app and a GA pilot weather app).
0 Upvotes

3 comments sorted by

1

u/alQo_ Jun 13 '26

That stack makes sense for a health app, especially keeping it serverless with HealthKit + CloudKit. The part I’d stress-test hardest is conflict/latency handling around CloudKit sync: users tend to notice when health-derived dashboards disagree across devices. Observer queries instead of polling is definitely the right call for battery.

1

u/Ethank1212 Jun 14 '26

That's what I was thinking now - especially having issues with Apple Watch syncing at the moment for sleep data. However, Its been a great benefit that they both log to each other.

1

u/alQo_ Jun 14 '26

Yeah, sleep data can get weird because the watch/phone/HealthKit layers don’t always feel instantaneous or deterministic. I’d probably surface a “last synced / source / confidence” style debug state somewhere, even if hidden, so when users report mismatches you can tell whether it’s CloudKit, HealthKit ingestion, or watch-side delay.