Hello,
I have similar problem, I just want to store enum in my @Model like this:
class Cat {
init(name: String,
birthDay: Date?,
breed: Breed?
) {
self.name = name
self.birthDay = birthDay
self.breed = breed
}
let name: String
let birthDay: Date?
let breed: Breed?
@Attribute(.unique)
let id = UUID()
}
enum Breed: String {
case unknown = "Unknown"
case ragdoll = "Ragdoll"
}
I also get three errors:
Instance method 'setValue(for:to:)' requires that 'Breed' conform to 'PersistentModel'
No exact matches in call to instance method 'getValue'
No exact matches in call to instance method 'setValue'
Have not found much information how to deal with that.
Post
Replies
Boosts
Views
Activity
Well, I have found out that if I add
Codable, Hashable
to my enum or your
struct Task: Identifiable, Codable, Hashable {...}
compiler stops complaining.
Hi, I would like to open this topic again and ask about private key export.
If I have a local certificate with private key in Mac Keychain, I am able to export private key by SecExportItem method.
However, now I have USB token which should require PIN with certificate and private key and I want to export private key from this USB token.
I used TKTokenWatcher.tokenIDs to get name of my token which can be used in query to get private key.
How should I proceed? How can I export private key from USB token with PIN security ?
thank you :)