-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with NSKeyedArchiver #24
Comments
Does the problem exist even if you change |
It's working just fine when changing it to a |
I'm trying to save an object from another model, inside an array, inside that dictionary. So basically, this is what i'm trying to achieve:
|
Currently saving an array of objects in a dictionary is not supported.
|
Hi ! Sorry for the late answer. I've implemented your idea, and it's working like a charm. Nice workaround that'll do the trick for now. I hadn't thought about it. Thanks for your help. I'll let you close the issue if you want to close it, or leave it open for now. |
Hi,
I'm trying to save a simple model to the Realm, but somehow, the new version using NsKeyedArchiver is throwing an exception.
Error Domain=NSCocoaErrorDomain Code=4866 "The data couldn’t be written because it isn’t in the correct format." UserInfo={NSUnderlyingError=0x60000168e8e0 {Error Domain=NSCocoaErrorDomain Code=4864 "This decoder will only decode classes that adopt NSSecureCoding. Class '__SwiftValue' does not adopt it." UserInfo={NSDebugDescription=This decoder will only decode classes that adopt NSSecureCoding. Class '__SwiftValue' does not adopt it.}}}
Here's and exemple of the model I'm trying to save.
`struct Model: Realmable, Codable {
}`
It will save the model, but the
dictionary
variable will be nil.I'm stuck there, I have tried many different solution but I won't work.
Thanks !
The text was updated successfully, but these errors were encountered: