Sending PHAssetCollection(s) over network

I have seen examples of code where a string value, and other similarly simple data types are sent via MultipeerConnectivity. There are also examples of how the Codable protocol can be used with en/decoding of JSON data payloads.


How can I convert a PHAssetCollection from 1 Apple device to another, running the same app, which will have sender/receiver functions defined using MultipeerConnectivity? There is no default <object>.data() option. The same principle would apply for any other object that my app creates an instance of.