# UTI of a CommonMark document

**URL:** <https://talk.commonmark.org/t/uti-of-a-commonmark-document/2406>\
**Category:** Uncategorized\
**Created:** [April 12, 2017, 1:10pm UTC](https://talk.commonmark.org/t/uti-of-a-commonmark-document/2406 "2017-04-12T13:10:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![digitalmoksha](https://cdn.commonmark.org/letter_avatar_proxy/v2/letter/d/53a042/32.png) [@digitalmoksha](https://talk.commonmark.org/u/digitalmoksha)\
**Post date:** [April 12, 2017, 1:10pm UTC](https://talk.commonmark.org/t/uti-of-a-commonmark-document/2406/1 "2017-04-12T13:10:50Z")

</div>

Does it make sense to have our own UTI (Universal Type Identifier), or maybe there is one?

For example, the standard for a Markdown document is “net.daringfireball.markdown”. Does it makes sense to use “org.commonmark.markdown” (which might indicate that this is a fully compliant CommonMark document), or is it better to just use the current standard.

Not trying to muddy the waters or detract form the current “net.daringfireball.markdown” namespace.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/codinghorror/32/2_2.png) [@codinghorror](https://talk.commonmark.org/u/codinghorror)\
**Post date:** [June 27, 2017, 1:33am UTC](https://talk.commonmark.org/t/uti-of-a-commonmark-document/2406/2 "2017-06-27T01:33:26Z")

</div>

Where is this even used?

---

<div class="post-metadata">

**Author:** ![digitalmoksha](https://cdn.commonmark.org/letter_avatar_proxy/v2/letter/d/53a042/32.png) [@digitalmoksha](https://talk.commonmark.org/u/digitalmoksha)\
**Post date:** [June 28, 2017, 10:46am UTC](https://talk.commonmark.org/t/uti-of-a-commonmark-document/2406/3 "2017-06-28T10:46:14Z")

</div>

UTI’s are used in macOS. It’s another way of identifying the type of data in a file, beyond file extension.

From [Apple’s documentation](https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319-CH201-SW1)

> One of the challenges facing application developers is the proliferation of methods to identify types of data. For example, some text files may be assigned a ‘TEXT’ file type (as originally designed for Mac OS 9 and earlier), while others may simply have a .txt filename extension. Some may have the .text extension instead. In addition, some file types might be subsets of other types; an application that opens all .txt files should probably also be able to open those with a .html extension. Determining all the possible files an application could read could become impossible. The user experience then suffers, with users not understanding why an application can open one text file but not another.

> To solve this problem, Apple has defined a syntax for special data identifiers called uniform type identifiers. Each UTI provides a unique identifier for a particular file type, data type, directory or bundle type, and so on. In addition, other type identifier namespaces for a particular type can be grouped under one UTI, with utility functions available to translate from one format to another.

And I am certainly no expert on them or how to define them. But it’s very common to see markdown files created with the `net.daringfireball.markdown` UTI. So I thought that it if someone is creating a CommonMark compliant file, it **might** make sense to set it’s UTI to something like `org.commonmark.markdown`, and have it inherit from `net.daringfireball.markdown`

---

<div class="post-metadata">

**Author:** ![codinghorror](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/codinghorror/32/2_2.png) [@codinghorror](https://talk.commonmark.org/u/codinghorror)\
**Post date:** [June 28, 2017, 9:48pm UTC](https://talk.commonmark.org/t/uti-of-a-commonmark-document/2406/4 "2017-06-28T21:48:32Z")

</div>

Apple has used Commonmark for swift: [https://github.com/apple/swift-cmark](https://github.com/apple/swift-cmark) so there is some prior art…

---

<div class="post-metadata">

**Author:** ![digitalmoksha](https://cdn.commonmark.org/letter_avatar_proxy/v2/letter/d/53a042/32.png) [@digitalmoksha](https://talk.commonmark.org/u/digitalmoksha)\
**Post date:** [July 7, 2017, 2:12pm UTC](https://talk.commonmark.org/t/uti-of-a-commonmark-document/2406/5 "2017-07-07T14:12:05Z")

</div>

Yeah…but I can’t find where they are creating markdown files. Maybe they are using their version of cmark for markdown parsing inside Xcode, but Xcode doesn’t create markdown files (afaik).

Just as an example, create a .c file in Xcode, and it has a UTI of `public.c-source`, create a playground and it’s `com.apple.dt.playground`
