Read The Advanced Guide to UserDefaults in Swift. Side learning: I didn’t know __PRETTY_FUNCTION__ exists.