I am developing an application that uses basic data (with UIManagedDocument) to store user data that I would like to sync with iCloud. I would also like to synchronize the photos that the user takes with the camera in the application.
I read that it is not recommended to store actual photos in the master data; rather, it is better to save the photos in the file system and put the URL file in the master data.
Using this method, is it recommended to use UIDocument to store photos on the file system (in the Documents folder)? I'm thinking of:
- For each individual photo, use NSFileWrapper (containing the actual image and thumbnail), or
- Use the top level NSFileWrapper and put all the NSFileWrappers for each photo in it.
- Like # 2, but just put all the photos / thumbnails directly in the top level NSFileWrapper
Which approach is better for syncing photos with iCloud? and are there any better approaches?
source share