Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8961321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:51:49+00:00 2026-06-15T15:51:49+00:00

I have an app that should try to save Markdown files. This is the

  • 0

I have an app that should try to save Markdown files. This is the relevant portions from my Info.plist:

<dict>
    <key>CFBundleTypeExtensions</key>
    <array>
        <string>md</string>
    </array>
    <key>CFBundleTypeIconFile</key>
    <string>icon.icns</string>
    <key>CFBundleTypeName</key>
    <string>Markdown document</string>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>LSItemContentTypes</key>
    <array>
        <string>net.daringfireball.markdown</string>
    </array>
    <key>LSHandlerRank</key>
    <string>Owner</string>
    <key>NSDocumentClass</key>
    <string>MyDocument</string>
    <key>NSExportableAs</key>
    <array>
        <string>Microsoft Word Document</string>
        <string>RTF</string>
        <string>HTML</string>
    </array>
    <key>NSExportableTypes</key>
    <array>
        <string>net.daringfireball.markdown</string>
        <string>com.microsoft.word.doc</string>
        <string>public.rtf</string>
        <string>public.html</string>
    </array>
</dict>

As you can see I also need the app to be able to export to doc, html and rtf.

Here is the UTExportedTypeDeclarations:

<dict>
    <key>UTTypeConformsTo</key>
    <array>
        <string>public.source</string>
    </array>
    <key>UTTypeDescription</key>
    <string>Markdown document</string>
    <key>UTTypeIdentifier</key>
    <string>net.daringfireball.markdown</string>
    <key>UTTypeTagSpecification</key>
    <dict>
        <key>public.filename-extension</key>
        <array>
            <string>md</string>
        </array>
    </dict>
</dict>

Now when I save a document in my app, and then run mdls on the file I get:

kMDItemContentType             = "dyn.ah62d4rv4ge8043a"
kMDItemContentTypeTree         = (
    "dyn.ah62d4rv4ge8043a",
    "public.data",
    "public.item"
)

Furthermore my app doesn’t seem to be able to open the files it previously saved and gives an error:

Error Domain=NSCocoaErrorDomain Code=256 “The autosaved document
“test10.md” could not be reopened. ” UserInfo=0x102210bf0
{NSLocalizedDescription=The autosaved document “test10.md” could not
be reopened. }

What am I doing wrong? How can I make it recognize my UTI properly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:51:51+00:00Added an answer on June 15, 2026 at 3:51 pm

    I believe that your conforms-to is incorrect. You need to have a super-type from the physical and the functional trees.

    There are many outdated things in the documentation, please see my writeup about what parts you really need nowadays. For example you don’t need the exportable types any more: http://www.cocoanetics.com/2012/09/fun-with-uti/

    regarding import/export. It depends if this app owns the file type. If it does it should export it. If not it should import it. Of all the apps exporting a type IIRC the latest one wins. Any app that is able to read your type should import it. Also apps that state that they are able to work with UTIs upwards from yours can open the file. e.g. if your format conforms to plain text, then TextEdit can also open it.

    Also with your experimenting you might have inadvertenly messed up your launch services UTI registry. My article mentions a way to clean it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an App that downloads and displays images from URL's. This works fine
My app should implement login with facebook but I have noticed that every time
I have an app that received JSON data from the server. Currently when I
I have a custom RatingBar in my app that should display either the site
i have made an app that would calculate numbers from input fields. **main Activity
I have a table in my Android app that only should store the 50
I have this app that is running in portrait mode and as a part
have an app that finds your GPS location successfully, but I need to be
Have an app that has listings - think classified ads - and each listing
I have an app that switches between full screen and normal screen for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.