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

  • SEARCH
  • Home
  • 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 3275590
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:09:40+00:00 2026-05-17T19:09:40+00:00

I am writing an application that makes use of Uniform Type Identifiers . Specifically,

  • 0

I am writing an application that makes use of Uniform Type Identifiers. Specifically, I am calling UTTypeCreateAllIdentifiersForTag() and passing it various MIME types.

My hope was that this function (as distinct from UTTypeCreatePreferredIdentifierForTag()) would give me the most specific UTI as well as all the UTIs to which it conforms. This appears not to be the case — it either returns a single UTI, or the secondary UTIs are spurious.

There is the UTTypeConformsTo() function defined in the same header file, but I’d prefer a function that returns an array of all the types to which this UTI conforms.

There appears to be hope for me, as MDItemCopyAttributeList() will return such a list. That said, it requires an MDItemRef, which can be created from either a file path or URL — which isn’t great. Sometimes my data is only stored in-memory and I only have a MIME type to go by.

Do I have to iterate through the entire database of UTIs to get this information or am I missing something?

  • 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-05-17T19:09:41+00:00Added an answer on May 17, 2026 at 7:09 pm

    I was indeed missing something: the very obvious solution. While I was trawling through the symbols exported by LaunchServices (and noticed the interesting, but private UTTypeCopyPedigree()), I was reminded of UTTypeCopyDeclaration(), which is defined.

    UTTypeCopyDeclaration() is given a UTI and returns (as a CFDictionaryRef) the property list in which the UTI was defined. The object in this dictionary with key kUTTypeConformsToKey is either a CFArrayRef or CFStringRef. In the case of an array, one can recursively iterate until a base type is reached.

    This is how I built up an inheritance tree for a given UTI. I hope this helps anyone else with the same issue.

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

Sidebar

Related Questions

im writing an application that downloads and installs addons for programs which needs to
I am writing an application that downloads large files in the background. All clients
I'm writing an application that on some stage performs low-level disk operations in Linux
I am writing an application that needs to bring window of an external app
I'm writing an application that is basically just a preferences dialog, much like the
I am writing an application that if the user hits back, it may resend
I am current writing an application that will require multiple inserts, updates and deletes
Say you are writing an application that must implement the HTTP protocol. Protocols are
I'm writing an application that uses renaming rules to rename a list of files
I'm writing an application that can be started either as a standard WinForms app

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.