27 lines
819 B
Swift
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) }
|
|
}
|
|
} |