I am attempting to use a iCloud-enabled UIDocument with a directory-based NSFileWrapper (aka File package) to maintain a complex application state. In my app, the user can have many distinct configurations (kind of like cars that have seat settings for each potential driver).
For each individual state I add a regular file NSFileWrapper to the overall file package.
The writing and reading of my UIDocument into/from the cloud is working fine. I also get notifications when the file package has changed.
The problem is that I can't figure out from the notification which of the additions or changes to the sub files (i.e., states) caused the package to change.
I've tried overriding the presentedSubitemDidChangeAtURL in my custom UIDocument but that only gives me the URL of the package. I've also experimented with the file wrapper's matchesContentsOfURL method, but that doesn't seem to be right since the child file wrappers don't have a "real" URL.
Comments and suggestions welcomed.