Currently I’m working on revising the storage chapter of The iOS Interview Guide and so far it looks like not that much has changed in the tools available for mobile developers to store data on iOS.
There are still same 4 main groups of storage available to us:
in-memory - arrays, dictionaries, structs, etc.
key-value persistent storage like user defaults and keychain
file disk storage
database storage options such as core data, realm, swiftdata, and sql
I’m finding some minor discrepancies, alterations, and deprecated methods that I’d need to adjust (NSCoding/NSSecureCoding, NSKeyedArchiver/NSKeyedUnarchiver, etc.) but otherwise there is no major changes.
I will be adding questions around SwiftData and more sample code to showcase how a storage object can interact with arrays/dictionaries for storage or user defaults, or file manager, or core data, etc. Technically it’s “new” but it’s basically the same category of ORM solutions like Core Data and Realm. It’s even using Core Data under the hood.
Let me know if there is any specific area around how to store and persist things on iOS you’d like me to cover (email me or DM or comment here under this post).
I guess the storage layer and the way you persist things is an overall a solved problem that is pretty stable and does not change much over the years if you isolate it well in your codebase!
This is good news, that’s exactly the type of fundamental, “unhyped”, type of knowledge I want to continue having in the 2nd edition of the book.
P.S. the original 1st book edition had a “bonus” chapter showcasing how to evolve your storage layer from simple to complex. I most likely will remove that chapter and instead add more code samples to each question in the storage chapter.