# iOS vs Android Feature Parity Matrix **Purpose:** Feature-by-feature comparison of iOS and Android implementations to track parity gaps. **Owner:** Development Team **Last Updated:** 2025-12-22 **Status:** active --- ## Storage & Persistence | Feature | Android | iOS | Notes | |---------|---------|-----|-------| | Persistent state | ✅ SQLite (Room) | ✅ CoreData + SQLite | Both implemented | | Schema versioning | ✅ Room migrations | ✅ Explicit | iOS has explicit version tracking in CoreData metadata (P2.1 complete) | | State survives app restart | ✅ Yes | ✅ Yes | Both implemented | | State survives OS kill | ✅ Yes | ✅ Yes | Both implemented | | State survives reboot | ✅ Yes | N/A | iOS handles notifications automatically | --- ## Notification Scheduling | Feature | Android | iOS | Notes | |---------|---------|-----|-------| | Exact alarms | ✅ AlarmManager | N/A | iOS uses UNUserNotificationCenter | | Daily rollover | ✅ Automatic | ✅ Automatic | Both implemented (iOS uses NotificationCenter pattern) | | Schedule persistence | ✅ Database | ✅ UNUserNotificationCenter | iOS OS-guaranteed | | Next notification retrieval | ✅ getNotificationStatus() | ✅ getNotificationStatus() | Both implemented | --- ## Recovery & Resilience | Feature | Android | iOS | Notes | |---------|---------|-----|-------| | App launch recovery | ✅ ReactivationManager | ✅ ReactivationManager | Both implemented with persistence | | Boot recovery | ✅ BootReceiver | N/A | iOS handles automatically | | Missed notification detection | ✅ Yes | ✅ Yes | Both implemented with persistent state | | Recovery logging | ✅ Comprehensive | ✅ Comprehensive | Both have good logging | | Invalid data recovery | ✅ Tested (TEST 4) | ✅ Tested (RecoveryTests) | Both have automated recovery tests | | Rollover idempotency | ✅ Tested | ✅ Tested | Both verify duplicate rollover prevention | | Migration safety | ✅ Tested | ✅ Tested | Both test unknown/missing fields | --- ## Background Execution | Feature | Android | iOS | Notes | |---------|---------|-----|-------| | Background fetch | ✅ WorkManager | ✅ BGTaskScheduler | Both implemented | | Background notification | ✅ WorkManager | ✅ BGTaskScheduler | Both implemented | | Execution time limits | ✅ Flexible | ⚠️ ~30 seconds | iOS has strict limits | | Battery optimization handling | ✅ Documented | N/A | iOS handles automatically | --- ## Error Handling | Feature | Android | iOS | Notes | |---------|---------|-----|-------| | Error codes | ✅ Structured | ✅ Structured | Both have error codes | | Error recovery | ✅ Yes | ✅ Yes | Both handle errors gracefully | | Invalid data handling | ✅ Recovery tested | ✅ Recovery tested | Both have automated recovery tests: Android (TEST 4), iOS `test_recovery_ignores_invalid_records_and_continues()` and `test_recovery_handles_null_fields()` (see `ios/Tests/DailyNotificationRecoveryTests.swift`) | --- ## Testing | Feature | Android | iOS | Notes | |---------|---------|-----|-------| | Unit tests | ✅ Yes | ⚠️ Partial | iOS has some tests | | Integration tests | ✅ Yes | ⚠️ Partial | iOS has some tests | | Test automation | ✅ High | ⚠️ Medium | iOS has manual components | | Recovery testing | ✅ Yes | ✅ Yes | Both have automated recovery tests (DailyNotificationRecoveryTests.swift) | | Combined edge case tests | ✅ Yes | ✅ Yes | Both have 3 combined scenarios: Android `test_combined_dst_boundary_duplicate_delivery_cold_start()`, `test_combined_rollover_duplicate_delivery_cold_start()`, `test_combined_schema_version_cold_start_recovery()` (see `android/src/test/java/com/timesafari/dailynotification/DailyNotificationRecoveryTests.kt`); iOS equivalent tests (see `ios/Tests/DailyNotificationRecoveryTests.swift`) | --- ## Summary ### Critical Gaps (P0) **None** - All critical gaps addressed: - ✅ iOS rollover implemented (NotificationCenter pattern) - ✅ iOS recovery testing implemented (DailyNotificationRecoveryTests.swift) - ✅ iOS persistence confirmed (CoreData + SQLite) ### Important Gaps (P1) 1. **Test Automation** - iOS tests can be run via xcodebuild, but CI integration may need macOS runners ### Nice-to-Have (P2) 1. **OS Reboot Testing** - True OS reboot scenarios (iOS handles automatically, but explicit testing may be valuable) --- **Last Updated:** 2025-12-22 (P2.3 complete) **Next Review:** After next major milestone