Matthew Raymer a54ba34cb9 feat(ios): Enhance battery optimization and notification management 2 months ago
..
DailyNotificationConfig.swift feat(ios): Enhance battery optimization and notification management 2 months ago
DailyNotificationConstants.swift feat: implement core notification functionality for iOS and Android - Add settings management, proper error handling, and platform-specific implementations 2 months ago
DailyNotificationError.swift feat: implement core notification functionality for iOS and Android - Add settings management, proper error handling, and platform-specific implementations 2 months ago
DailyNotificationLogger.swift feat: implement core notification functionality for iOS and Android - Add settings management, proper error handling, and platform-specific implementations 2 months ago
DailyNotificationMaintenanceWorker.swift feat(ios): Enhance battery optimization and notification management 2 months ago
DailyNotificationPlugin.swift feat(ios): Enhance battery optimization and notification management 2 months ago
DailyNotificationPowerManager.swift feat(ios): Enhance battery optimization and notification management 2 months ago
README.md refactor: improve build configuration and code organization 2 months ago
index.ts refactor: improve build configuration and code organization 2 months ago

README.md

iOS Implementation

This directory contains the iOS-specific implementation of the DailyNotification plugin.

Implementation Details

The iOS implementation uses:

  • BGTaskScheduler for background data fetching
  • UNUserNotificationCenter for notification management
  • UserDefaults for local data storage
  • iOS notification categories and actions

Native Code Location

The native iOS implementation is located in the ios/ directory at the project root.

Key Components

  1. DailyNotificationIOS.swift: Main plugin class
  2. BackgroundTaskManager.swift: Handles background fetch scheduling
  3. NotificationManager.swift: Manages notification creation and display
  4. DataStore.swift: Handles local data persistence

Implementation Notes

  • Uses BGTaskScheduler for reliable background execution
  • Implements proper battery optimization handling
  • Supports iOS notification categories and actions
  • Handles background refresh limitations
  • Uses UserDefaults for lightweight data storage

Testing

Run iOS-specific tests with:

npm run test:ios