I have a transient attribute that holds a pointer to an image. The class of that image is specified in the core data model file as UIImage but I need to also support NSImage.
How would I support both if the model file is asking me for the class name and the module name?
EDIT
My model is backed by core data, so I am using a scheme that Apple recommends to ensure my local persistence plays nicely with iCloud.



If it was me I'd change it from a transformable to a binary data property, and then save PNG or JPG data in the property. Transformable isn't a good choice here because it encodes the class name with the image data (along with whatever other data the class decides to include when encoding itself).
With
UIImagethis is pretty simple-- you can usepngData()to get the data andinit(data:)to convert back. WithNSImageit's slightly less convenient but not hard. There are numerous examples here on SO that explain the steps, for example here.