0 Replies
      Latest reply on May 18, 2020 4:24 AM by Desbrina
      Desbrina Level 1 Level 1 (0 points)

        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)[0] 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?