-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
P1High priority - fix in current sprintHigh priority - fix in current sprintenhancementNew feature or requestNew feature or requestintegrationThird-party service integrationThird-party service integration
Description
📋 Sub-task of #97
Description
Replace mock CloudService with real CloudKit implementation for data synchronization across devices.
Current State
- CloudService.swift uses mock implementation
- No actual cloud sync functionality
- Falls back to local storage only
Implementation Tasks
- Configure CloudKit container and schema
- Implement CloudKitService conforming to CloudService protocol
- Add record types for all entities (Item, Location, Photo, Receipt)
- Implement sync engine with conflict resolution
- Add offline queue for pending changes
- Implement subscription for real-time updates
- Add progress tracking for sync operations
CloudKit Schema Design
Record Types:
- Item (fields: name, category, value, etc.)
- Location (fields: name, parentReference)
- Photo (fields: itemReference, imageAsset)
- Receipt (fields: store, date, amount, items)
Key Features
- Automatic sync on app launch
- Background sync when data changes
- Conflict resolution (last-write-wins)
- Batch operations for efficiency
- Progress indicators for users
- Error recovery mechanisms
Technical Requirements
- Enable CloudKit capability in project
- Create CKContainer configuration
- Implement CKRecord extensions for models
- Add sync status to UI
- Handle account changes
- Implement data migration
Testing Requirements
- Test sync between multiple devices
- Test conflict resolution
- Test offline/online transitions
- Test large dataset sync
- Test account switching
Performance Goals
- Sync 1000 items < 30 seconds
- Incremental sync < 5 seconds
- Offline queue handling
Estimated Effort: 1 week
Metadata
Metadata
Assignees
Labels
P1High priority - fix in current sprintHigh priority - fix in current sprintenhancementNew feature or requestNew feature or requestintegrationThird-party service integrationThird-party service integration