Creating Custom Document Types

When your application builds new kinds of documents, you should declare them in the Exported UTIs section of the Target > Info editor, which you see in Figure 11-9. This registers support for this file type with the system and identifies you as the owner of that type.

Image

Figure 11-9 Declare custom file types in the Exported UTIs section of the Target > Info editor.

To define the new type, supply a custom UTI (here, com.sadun.cookbookfile), document art (at 64 and 320 sizes), and specify a filename extension that identifies your file type. As with declaring document support, Xcode builds an exported declaration array ...

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.