Fixed iOS 13.0 compatibility issue in test harness by replacing Logger (iOS 14+) with os_log (iOS 13+). Fixed build script to correctly detect and sync Capacitor config from App subdirectory. Unified both Android and iOS test app UIs to use www/index.html as the canonical source. Changes: - DailyNotificationBackgroundTaskTestHarness: Replace Logger with os_log for iOS 13.0 deployment target compatibility - build-ios-test-app.sh: Fix Capacitor sync path detection to check both current directory and App/ subdirectory for config files - test-apps: Update both Android and iOS test apps to use www/index.html as the canonical UI source for consistency This ensures the plugin builds on iOS 13.0+ and both test apps provide the same testing experience across platforms.
iOS Implementation
This directory contains the iOS-specific implementation of the DailyNotification plugin.
Current Implementation Status
✅ IMPLEMENTED:
- Basic plugin structure (
DailyNotificationPlugin.swift) - UserDefaults for local data storage
- Power management (
DailyNotificationPowerManager.swift) - Battery optimization handling
- iOS notification categories and actions
❌ NOT IMPLEMENTED (Planned):
BGTaskSchedulerfor background data fetching- Background task management
- Silent push nudge support
- T–lead prefetch logic
Implementation Details
The iOS implementation currently uses:
UNUserNotificationCenterfor notification management ✅UserDefaultsfor local data storage ✅- iOS notification categories and actions ✅
- Power management and battery optimization ✅
Planned additions:
BGTaskSchedulerfor background data fetching- Background task management
- Silent push support
Native Code Location
The native iOS implementation is located in the ios/ directory at the project root.
Key Components
DailyNotificationPlugin.swift: Main plugin class ✅DailyNotificationPowerManager.swift: Power state management ✅DailyNotificationConfig.swift: Configuration options ✅DailyNotificationMaintenanceWorker.swift: Maintenance tasks ✅DailyNotificationLogger.swift: Logging system ✅
Missing Components (Planned):
BackgroundTaskManager.swift: Handles background fetch schedulingNotificationManager.swift: Manages notification creation and displayDataStore.swift: Handles local data persistence
Implementation Notes
- Uses UserDefaults for lightweight data storage ✅
- Implements proper battery optimization handling ✅
- Supports iOS notification categories and actions ✅
- Handles background refresh limitations ✅
Planned Features:
- BGTaskScheduler for reliable background execution
- Silent push notification support
- Background task budget management
Testing
Run iOS-specific tests with:
npm run test:ios