Implement offline mode with background sync
Overview
Implements offline-first architecture for iOS app with React Native.
Implementation
- AsyncStorage for local content caching (75MB limit)
- Background sync on WiFi + charging
- Conflict resolution (server wins)
- Last sync timestamp display
- Manual sync trigger button
Product Requirements
Closes #9 (closed) (Product requirement from @ben)
Technical Details
- React Native AsyncStorage API
- NetInfo for connectivity detection
- Background task handling with react-native-background-fetch
- Exponential backoff on sync failures
Testing
- Offline mode works seamlessly
- Sync resumes after connectivity restored
- No data loss scenarios
- Battery impact < 2% per day
Performance
- Initial cache load: < 2s
- Sync operation: < 30s for 50MB data
cc: @dmitry for Android parity