feat: implement core notification functionality for iOS and Android - Add settings management, proper error handling, and platform-specific implementations
This commit is contained in:
52
ios/Plugin/DailyNotificationConstants.swift
Normal file
52
ios/Plugin/DailyNotificationConstants.swift
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* DailyNotificationConstants.swift
|
||||
* Daily Notification Plugin for Capacitor
|
||||
*
|
||||
* Defines constant values used throughout the notification plugin
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
|
||||
/// Constants used throughout the DailyNotification plugin
|
||||
///
|
||||
/// This structure provides centralized access to all constant values used in the plugin,
|
||||
/// making it easier to maintain and update common values.
|
||||
public struct DailyNotificationConstants {
|
||||
/// Default notification title when none is provided
|
||||
public static let defaultTitle = "Daily Notification"
|
||||
|
||||
/// Default notification body when none is provided
|
||||
public static let defaultBody = "Your daily update is ready"
|
||||
|
||||
/// Prefix used for notification identifiers
|
||||
public static let notificationIdentifierPrefix = "daily-notification-"
|
||||
|
||||
/// Name of the event emitted for notification interactions
|
||||
public static let eventName = "notification"
|
||||
|
||||
/// Default settings for notifications
|
||||
public struct Settings {
|
||||
/// Whether sound is enabled by default
|
||||
public static let defaultSound = true
|
||||
|
||||
/// Default priority level for notifications
|
||||
public static let defaultPriority = "default"
|
||||
|
||||
/// Default number of retry attempts
|
||||
public static let defaultRetryCount = 3
|
||||
|
||||
/// Default interval between retries (in milliseconds)
|
||||
public static let defaultRetryInterval = 1000
|
||||
}
|
||||
|
||||
/// Keys used in plugin method calls
|
||||
public struct Keys {
|
||||
public static let url = "url"
|
||||
public static let time = "time"
|
||||
public static let title = "title"
|
||||
public static let body = "body"
|
||||
public static let sound = "sound"
|
||||
public static let priority = "priority"
|
||||
public static let timezone = "timezone"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user