Skip to content

CloudSync: mirror chosen Settings into iCloud key-value storage - #45

Merged
bitsly merged 1 commit into
mainfrom
feat/cloud-sync
Jul 23, 2026
Merged

CloudSync: mirror chosen Settings into iCloud key-value storage#45
bitsly merged 1 commit into
mainfrom
feat/cloud-sync

Conversation

@bitsly

@bitsly bitsly commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Adds CloudSync, which mirrors a declared set of UserDefaults keys into NSUbiquitousKeyValueStore so every Setting bound to those keys syncs across devices (and across apps sharing a ubiquity kvstore identifier).

  • Last-writer-wins conflict policy; on start() iCloud wins, local-only values upload (first-run migration)
  • Equality-based reconciliation makes echo loops terminate without guard flags
  • UbiquitousKeyValueStore seam protocol keeps iCloud out of tests
  • 16 new tests, 100% line coverage maintained

🤖 Generated with Claude Code

Settings stay UserDefaults-backed and observation stays untouched;
CloudSync reconciles a declared key set against
NSUbiquitousKeyValueStore by value equality, pushing local writes and
pulling external changes. Apps that declare the same ubiquity kvstore
identifier share the mirror, which is how a learner profile typed into
one app reaches its sibling.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bitsly
bitsly merged commit 79e54d7 into main Jul 23, 2026
@bitsly
bitsly deleted the feat/cloud-sync branch July 23, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants