I found out that if I delete an App from the device, all local documents are deleted of course, but if the App has files stored in the iCloud-enabled folder ([[[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]
) - These files are not deleted.
This causes two problems:
- The storage taken by these files is not freed.
- If the user re-installs the App, there are already files in the folder, which disrupts normal initialization.
I can take care of the second issue by going through the directory on first launch and deleting everything in there, but it seems a bit awkward.
I can't think of a way to take care of the first issue.
Any ideas?