• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What REALLY determines which application opens a file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What REALLY determines which application opens a file?


  • Subject: Re: What REALLY determines which application opens a file?
  • From: G S <email@hidden>
  • Date: Tue, 7 Sep 2010 21:46:15 -0700

Hi Quincey.  Thanks for your response.

> It's not clear from your original post whether you know that files don't *have* UTIs as metadata. They have extensions or file types as metadata, and the translation from file metadata to UTI is handled by Launch Services after aggregating all of the UTI definitions from installed apps, plus the UTI definitions variously built in to the frameworks.

Yes, I noted that the plist entries for the UTIs also include filename
extensions, thus establishing that association.  Mine look like this:

	<key>UTImportedTypeDeclarations</key>
	<array>
		<dict>
			<key>UTTypeConformsTo</key>
			<array>
				<string>public.movie</string>
			</array>
			<key>UTTypeDescription</key>
			<string>GHV video</string>
			<key>UTTypeIdentifier</key>
			<string>com.whatever.GHV</string>
			<key>UTTypeReferenceURL</key>
			<string>http://whatever.com</string>
			<key>UTTypeTagSpecification</key>
			<dict>
				<key>public.filename-extension</key>
				<array>
					<string>ghv</string>
				</array>
			</dict>
		</dict>
	</array>


>Then, for regular applications, if the document type definition contains a UTI, that definition (again, aggregated by Launch Services with other document type definitions) determines which applications are treated as candidates for opening documents based on UTI.

I didn't have any entry in the "Document Types" list in the target's
properties.  The documentation didn't mention (let alone explain) the
relationship between this list and the UTI collection in the plist.  I
still don't see why you'd have both.  For some reason I didn't think
Perian had document types in its importer target, but it turns out
that it does.  So I'll add one to mine.

> All of this covers a lot of conceptual ground, some of which is undocumented, or at least combines new with old technologies that are documented in completely separate places.

Yes, with many a missing reference.  For example, the Launch Services
documentation makes no mention of the UTIs in the plist, but the tech
note on those UTIs specifically refers to Launch Services as one of
their users.

And yes, I did post a couple of questions to the QuickTime-API list too.

Thanks!
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: What REALLY determines which application opens a file?
      • From: Quincey Morris <email@hidden>
References: 
 >What REALLY determines which application opens a file? (From: G S <email@hidden>)
 >Re: What REALLY determines which application opens a file? (From: G S <email@hidden>)
 >Re: What REALLY determines which application opens a file? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: What REALLY determines which application opens a file?
  • Next by Date: Lake Forest Cocoaheads meeting 9/8 - design patterns, Cocoa and other
  • Previous by thread: Re: What REALLY determines which application opens a file?
  • Next by thread: Re: What REALLY determines which application opens a file?
  • Index(es):
    • Date
    • Thread