Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In OS X, an extension can correspond to one or more UTIs. The sample code gives an array for an extension.

NSArray *UTIs = (NSArray *)UTTypeCreateAllIdentifiersForTag(kUTTagClassFilenameExtension,
(CFStringRef)extension,
nil);

So for e1 there can be u1, u2, u3,…

Now there is a case where e1, e2, e3 correspond to the same u1.

So I have 2 questions:

  1. Is there a case where we have the following situation?

    u1: e1,e2,e3
    u2: e1,e4,e5
    u3: e4,e6
    
  2. Based on this, if I have to set a default application for e1, which can be only set if I get u1 and u2, will this work properly?

share|improve this question
    
To prevent premature close votes: This question contains sample code, but appears to be on topic as a whole. – Daniel Beck Feb 1 '12 at 17:49
    
Manish, are you asking about general system behavior, or specifically about the the Objective-C APIs you're using? – Daniel Beck Feb 1 '12 at 17:53
    
I wrote a snippet of code to highlight that there can be multiple UTI's for a single extension. – Manish Feb 2 '12 at 2:05
    
So I am asking about a general system behavior and what logic OSX implements for setting a default application. – Manish Feb 2 '12 at 2:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.