-
Hello! public extension SharedKey where Self == FileStorageKey<DeveloperToolsSettings>.Default {
static var developerToolsSettings: Self {
Self[
.fileStorage(
.documentsDirectory.appending(component: "my-file-name.json")
),
default: .default
]
}
}
public struct DeveloperToolsSettings: Codable, Sendable {
public var overrideService: Bool = false
public var serviceURL: String = ""
public var showDateIntervalPickerDebug: Bool = false
... some custom CodingKeys and init(from decoder: Decoder)...
} Some of our internal users are reporting they receive the following error:
And when opening the file, it contains:
Why is this happening, and what am I doing wrong to trigger this problem? I'm using version Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @cabeca, the "stub" file was removed from the library a few months ago (version 2.4). I suppose there is a chance that older clients that have that file around could see the error. But also I believe the error is harmless. It just lets you know of a decoding error and then writes the fresh value to disk. Have you noticed any strange behavior come up besides the warning? We can look into silencing the error for the specific situation of it being equal to the stub string. |
Beta Was this translation helpful? Give feedback.
Hi @cabeca, the "stub" file was removed from the library a few months ago (version 2.4). I suppose there is a chance that older clients that have that file around could see the error. But also I believe the error is harmless. It just lets you know of a decoding error and then writes the fresh value to disk. Have you noticed any strange behavior come up besides the warning?
We can look into silencing the error for the specific situation of it being equal to the stub string.