Files
daily-notification-plugin/ios/Plugin/DailyNotificationPlugin.swift
Matthew Raymer a7dd559c4a feat(ios): implement scheduleDailyNotification method
Implemented main scheduling method for iOS plugin, matching Android functionality:

Core Features:
- Permission checking and requesting (iOS notification authorization)
- Time parsing (HH:mm format) with validation
- Next run time calculation (handles same-day and next-day scheduling)
- UNUserNotificationCenter scheduling with daily repeat
- Priority/interruption level support (iOS 15.0+)
- Prefetch scheduling 5 minutes before notification (BGTaskScheduler)
- Schedule storage in UserDefaults

Implementation Details:
- Checks notification authorization status before scheduling
- Requests permission if not granted (equivalent to Android exact alarm permission)
- Parses time string and calculates next occurrence
- Creates UNCalendarNotificationTrigger for daily repeat
- Schedules BGAppRefreshTask for prefetch 5 minutes before
- Stores schedule metadata in UserDefaults for persistence

Matches Android API:
- Same parameter structure (time, title, body, sound, priority, url)
- Same behavior (daily repeat, prefetch scheduling)
- iOS-specific adaptations (UNUserNotificationCenter vs AlarmManager)

This is the first critical method implementation (10/52 methods now complete).
2025-11-11 01:50:26 -08:00

26 KiB