NSCoding-like Persistence

(Anton Zhilin) #1

Search JSONCodable framework, it does the job of encoding/decoding almost all of your data. It has broken with Swift 2.2, so if you are going to put some effort into persistence, it could be easier for you to fix that bug and use it.

I'm afraid, no library can serialize closures right now, because we can't access the thunk. You can use protocols instead of closures, with additional JSONCodable conformance.