Fix critical iOS notification service issues

- Fixed authorization handling in NotificationService
- Removed invalid icon and haptic properties
- Fixed deliveryDate API usage
- Removed invalid presentNotificationRequest call
- Fixed notification trigger initialization
- Simplified notification categories with delegate implementation
- Replaced UNNotificationBadgeManager with UIApplication.shared.applicationIconBadgeNumber
- Eliminated code duplication in badge update logic
- Fixed NotificationPreferencesStore JSON encoding/decoding
This commit is contained in:
2026-03-30 23:54:39 -04:00
parent 14efe072fa
commit dd4e184600
16 changed files with 1041 additions and 331 deletions

View File

@@ -0,0 +1,28 @@
import Foundation
/// Notification preferences data structure
@objcMembers
class NotificationPreferences: NSObject, Codable {
var newArticles: Bool
var episodeReleases: Bool
var customAlerts: Bool
var badgeCount: Bool
var sound: Bool
var vibration: Bool
init(
newArticles: Bool = true,
episodeReleases: Bool = true,
customAlerts: Bool = true,
badgeCount: Bool = true,
sound: Bool = true,
vibration: Bool = true
) {
self.newArticles = newArticles
self.episodeReleases = episodeReleases
self.customAlerts = customAlerts
self.badgeCount = badgeCount
self.sound = sound
self.vibration = vibration
}
}