vOOice/VoiceInk/Services/UserDefaultsManager.swift
2025-02-22 11:52:41 +05:45

27 lines
819 B
Swift

import Foundation
extension UserDefaults {
enum Keys {
static let aiProviderApiKey = "VoiceInkAIProviderKey"
static let licenseKey = "VoiceInkLicense"
static let trialStartDate = "VoiceInkTrialStartDate"
}
// MARK: - AI Provider API Key
var aiProviderApiKey: String? {
get { string(forKey: Keys.aiProviderApiKey) }
set { setValue(newValue, forKey: Keys.aiProviderApiKey) }
}
// MARK: - License Key
var licenseKey: String? {
get { string(forKey: Keys.licenseKey) }
set { setValue(newValue, forKey: Keys.licenseKey) }
}
// MARK: - Trial Start Date
var trialStartDate: Date? {
get { object(forKey: Keys.trialStartDate) as? Date }
set { setValue(newValue, forKey: Keys.trialStartDate) }
}
}