I'm currently sharing data between devices using core data and cloud kit.
Currently I have a "Picture" entity which stores the filename, the date it was added and a relation to another entity.
The details in core data successfully syncs, how would I go about syncing the image file. The file is saved in the documents folder and I can get its file path using
let imagePath = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) as NSString).appendingPathComponent(imageName)
Research seems to show I need to use CKAsset to upload/download the file but how do I go about doing this?
Retrieving data ...