Files
daily-notification-plugin/ios
Matthew Raymer ca081e971d feat(ios): implement getHistory, getHistoryStats, getAllConfigs, updateConfig, and deleteConfig methods
Implemented history and config management methods:

getHistory():
- Returns history entries with optional filters (since, kind, limit)
- Uses Core Data History entity
- Filters by timestamp and kind
- Sorts by occurredAt descending (most recent first)
- Returns history array matching Android API

getHistoryStats():
- Returns statistics about history entries
- Counts outcomes and kinds
- Finds mostRecent and oldest timestamps
- Returns totalCount, outcomes, kinds, mostRecent, oldest
- Uses Core Data for aggregation

getAllConfigs():
- Returns all configurations (limited by UserDefaults enumeration)
- Supports optional filters (timesafariDid, configType)
- Note: UserDefaults doesn't support key enumeration directly
- Returns empty array (limitation documented)

updateConfig():
- Updates existing configuration value
- Validates config exists before updating
- Supports optional timesafariDid for scoped configs
- Handles JSON and plain string values
- Returns updated config

deleteConfig():
- Deletes configuration by key
- Validates config exists before deletion
- Supports optional timesafariDid for scoped configs
- Removes from UserDefaults

iOS Adaptations:
- Uses Core Data History entity for history storage
- UserDefaults for config storage (enumeration limitation)
- Timestamp conversion (Date to milliseconds)
- Predicate-based filtering for Core Data queries

Progress: 52/52 methods implemented (100% COMPLETE!)
2025-11-11 02:23:41 -08:00
..