I'm trying to save a date in Keychain, and (from my understanding) this first requires converting the Date
object into a Data
object.
This Stack Overflow Q/A explains how to do it (or at least part of it) in Swift 3, but I'm hoping someone can provide the to/from functions in Swift 5 (since at least one of the methods in that solution are deprecated and I'm worried something else hasn't stood the test of time either).