Recipe: Monitoring the Documents Folder

iOS documents aren’t trapped in their sandboxes. You can and should share them with your users. Offer users direct control over their documents and access to any material they may have created on-device. A simple Info.plist setting enables iTunes to display the contents of a user’s Documents folder and enables those users to add and remove material on demand.

At some point in the future, you may use a simple NSMetadataQuery monitor to watch your Documents folder and report updates. At this writing, that metadata surveillance is not yet extended beyond iCloud for use with other folders. Code ported from OS X fails to work as expected on iOS. At this writing, there are precisely two available search domains ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.