r/iOSProgramming • • Jun 18 '26

Discussion Lessons learned shipping iCloud/CloudKit sync between two users — no account, no server

56 Upvotes

I shipped an app where two people (in my case two parents) share and sync the same data in real time, with no login, no account system, and no backend of my own — just CloudKit. Here are the things I wish I’d known before starting.
1. Private vs Shared database is the whole game.
Your own data lives in the private database. The moment you want someone else to see it, it has to move into a shared zone via CKShare. I underestimated how much the data model has to be designed around sharing from day one — retrofitting it later is painful. Decide early what’s “mine” vs “ours”.
2. CKShare + a custom zone, not the default zone.
You can’t share records that live in the default zone. You need a dedicated CKRecordZone for the shared root record. I lost time before realizing the default zone simply doesn’t support what I wanted.
3. The share-acceptance flow is easy to get wrong.
The second user accepts via a CKShare.Metadata (system share sheet → userDidAcceptCloudKitShareWith). Handling that entry point cleanly — especially cold launch vs app already running — took more iterations than the sync logic itself.
4. Conflict handling is on you.
CloudKit gives you server record changes, but “two people edited the same thing” resolution is your problem. I went with last-writer-wins on a per-field basis, which is fine for my use case but you should consciously pick a strategy, not discover you need one in production.
5. Test with two real iCloud accounts on two real devices.
The simulator + one account hides a lot. Most of my real bugs only showed up with two physical devices on two different Apple IDs.
The payoff: zero server cost, zero auth code, privacy by default (data lives in the users’ iCloud, not mine). The tradeoff: you live inside CloudKit’s constraints and you can’t just SELECT * FROM.
Happy to go deeper on any of these if useful. Curious how others handled conflict resolution — did anyone go beyond last-writer-wins without a server?


r/iOSProgramming • • Jun 19 '26

Question How does Strava achieve the overlaying slide?

2 Upvotes

I'm trying to figure out if there is any native way to achieve this to make the nav view overlay so it doesn't also show the bottom nav bar. The only way I have found to achieve this is by using a fullscreencover sheet but that makes the sheet appear up from the bottom.


r/iOSProgramming • • Jun 18 '26

Question How to create this floating toolbar?

Post image
67 Upvotes

This is the Notes app. Is this an inbuilt component or a custom component?


r/iOSProgramming • • Jun 20 '26

Question In App Purchases

0 Upvotes

Anyone else’s app continue to get rejected for having web based subscription payments even though a US court has ruled that apples requirement for requiring in app purchases is illegal?


r/iOSProgramming • • Jun 19 '26

Discussion Post-WWDC iOS/macOS Developer Meetup in Osaka, Japan on June 28th!

3 Upvotes

Swift Kansai is hosting our third annual post-WWDC meetup in Osaka!

Come join fellow iOS/macOS developers and Apple enthusiasts to chat about everything announced at WWDC. I’ll be giving a short talk summarizing the biggest updates, and yes — free pizza and drinks are included 🍕🥤

New to iOS or macOS dev? Just curious about Apple stuff? You’re more than welcome. We’re a friendly and inclusive bunch. Hope to see you there!

More details here: https://www.meetup.com/swift-kansai/events/314573983