fix(mac): avoid static UserDefaults in InstanceIdentity

main
Peter Steinberger 2025-12-12 16:59:51 +00:00
parent 6a05d60f41
commit fd0314a6bd
1 changed files with 2 additions and 2 deletions

View File

@ -4,9 +4,9 @@ enum InstanceIdentity {
private static let suiteName = "com.steipete.clawdis.shared" private static let suiteName = "com.steipete.clawdis.shared"
private static let instanceIdKey = "instanceId" private static let instanceIdKey = "instanceId"
private static let defaults: UserDefaults = { private static var defaults: UserDefaults {
UserDefaults(suiteName: suiteName) ?? .standard UserDefaults(suiteName: suiteName) ?? .standard
}() }
static let instanceId: String = { static let instanceId: String = {
if let existing = defaults.string(forKey: instanceIdKey)? if let existing = defaults.string(forKey: instanceIdKey)?