• 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: Uniform Type Identifiers (UTIs)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uniform Type Identifiers (UTIs)


  • Subject: Re: Uniform Type Identifiers (UTIs)
  • From: Philip Dow <email@hidden>
  • Date: Wed, 4 Jan 2006 09:57:53 +0100

As a follow up...

I am noticing that the UTI scheme does not always identify the super type of a file. I have users trying to import regular text files identified by extensions such as .en but the method UTTypeConformsTo does not return true when checking this file against kUTTypePlainText. Is there an easy way for a user to set the file type of a file or many files without changing the extension. In the Finder, you can choose get info to change the associated application. Is there something like that for file type?

-Phil

On Jan 4, 2006, at 1:48 AM, August Trometer wrote:

On 1/3/06, Philip Dow <email@hidden> wrote:
According to bit of documentation, UTIs should work in 10.3.9, but
according to another bit of documentation, the constants used by the
UTI implementation such as kUTTypeText or kUTTypeWebArchive are
available as of 10.4. What's going on here? Am I allowed to use the
UTI scheme in 10.3.9 as long as I hardcode the UTI definitions, ie
@"com.apple.webarchive" for kUTTypeWebArchive. The crash log does not
offer much in the way of usefulness when the app goes down during an
import, but if I had to guess, it would be because I'm referencing
symbols that are only included in 10.4 and above.

Can anyone confirm that hypothesis?

Cross-development support in Xcode and the SDK exist to help detect issues like the above. (search ADC for "cross development")


Anyway looking at the header that defines "kUTTypeWebArchive" (UTCoreType.h) I see the following...

extern const CFStringRef kUTTypeWebArchive
AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;

So you could use cross-development and weak linking to check if that
is available at run-time and if not use a definition from your own
binary.

-Shawn
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Uniform Type Identifiers (UTIs)
      • From: Jim Correia <email@hidden>
References: 
 >Uniform Type Identifiers (UTIs) (From: Philip Dow <email@hidden>)
 >Re: Uniform Type Identifiers (UTIs) (From: August Trometer <email@hidden>)

  • Prev by Date: Re: insertText
  • Next by Date: RE: insertText
  • Previous by thread: Re: Uniform Type Identifiers (UTIs)
  • Next by thread: Re: Uniform Type Identifiers (UTIs)
  • Index(es):
    • Date
    • Thread