Implementing Document Support

When your application provides document support, you should check for an Inbox folder each time it becomes active:

- (void)applicationDidBecomeActive:(UIApplication *)application {     // perform inbox test here }

Specifically, see if an Inbox folder has appeared in the Documents folder. If it has, you should move elements out of that Inbox to where they belong, typically in the main Documents directory. After the Inbox has been cleared, delete it. This provides the best user experience, especially in terms of any file sharing through iTunes, where the Inbox and its role may confuse users.

When moving items to Documents, check for name conflicts and use an alternative path name (typically ...

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.