I need to store a DateComponents object as a field in CloudKit.
How would I do that?
So far I think I need to set the CloudKit field to type Bytes, and convert the DateComponents object to a Data object. Looking at the documentation for the Data class, I can't figure out how to initialize the Data object. I have no idea how to use the UnsafeBufferPointer<SourceType> used in one of the initializers.