April 2015
Intermediate to advanced
556 pages
17h 47m
English
In Chapter 12, we discussed how UTIs are used by OS X to identify file types.
The pasteboard also uses UTIs for this purpose.
Although you did not use UTIs directly in this exercise,
NSString uses NSPasteboardTypeString
as its type when it reads and writes itself from the pasteboard.
If you were to log the value of NSPasteboardTypeString,
you would find that its value is public.utf8-plain-text.
The hierarchical nature of UTIs enables an application to be broad
(public.image) or specific (public.png)
when requesting objects from the pasteboard.
The system will work out whether a type is permissible based on what types it conforms to.
At some point, you will want to ...
Read now
Unlock full access