You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For whatever reason (probably Swift 2) I had originally included just the source files of AwesomeCache and I have a bunch of cache files created.
When I reworked some of my project files, I moved AwesomeCache to build as a framework. Now I get "cannot decode object of class" crashes from NSKeyedArchiver because the identifiers have moved from [projectid].CacheObject to AwesomeCache.CacheObject.
I can just use the source files so not a huge deal for me, but I'm wondering if AwesomeCache can do anything to prevent this? Not attempting to decode objects with incorrect IDs would be a minimal fix, but being able to detect and use the alternate IDs is optimal.
The text was updated successfully, but these errors were encountered:
Do you think this would be sufficient to fix your issue?
// before archive
NSKeyedArchiver.setClassName("CacheObject", forClass:CacheObject.self)
// before unarchive
NSKeyedUnarchiver.setClass(CacheObject.self, forClassName:"CacheObject")
Unfortunately, I am not an expert on this either. I guess this change would fix it, but also I don't see a way to effectively test this hypothesis. Do you still have a setup that makes it possible to test this possible fix?
For whatever reason (probably Swift 2) I had originally included just the source files of AwesomeCache and I have a bunch of cache files created.
When I reworked some of my project files, I moved AwesomeCache to build as a framework. Now I get "cannot decode object of class" crashes from
NSKeyedArchiver
because the identifiers have moved from[projectid].CacheObject
toAwesomeCache.CacheObject
.I can just use the source files so not a huge deal for me, but I'm wondering if AwesomeCache can do anything to prevent this? Not attempting to decode objects with incorrect IDs would be a minimal fix, but being able to detect and use the alternate IDs is optimal.
The text was updated successfully, but these errors were encountered: